From: Aaron Schulz Date: Thu, 22 May 2014 20:46:13 +0000 (-0700) Subject: Made getName() in ArchivedFile work when loaded via sha1 X-Git-Tag: 1.31.0-rc.0~15609^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27votes%27%2C%20votes=%27waiting%27%29%20%7D%7D?a=commitdiff_plain;h=024a87fbd4a72c2d75eceffc810b01464d32db04;p=lhc%2Fweb%2Fwiklou.git Made getName() in ArchivedFile work when loaded via sha1 Change-Id: I44e9c129f6c5841f8cbc9792aa9ff0f353bce6c0 --- diff --git a/includes/filerepo/file/ArchivedFile.php b/includes/filerepo/file/ArchivedFile.php index 845fd71577..1eee6a23bf 100644 --- a/includes/filerepo/file/ArchivedFile.php +++ b/includes/filerepo/file/ArchivedFile.php @@ -281,6 +281,10 @@ class ArchivedFile { * @return string */ public function getName() { + if ( $this->name === false ) { + $this->load(); + } + return $this->name; }