X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2Ffile%2FArchivedFile.php;h=effa3eeb7040476b0b6c12bcf86a2465caf7a3a3;hb=cf6b50fa13ba3c2744593eda625f4492929b89d9;hp=8bf90402f11da8a51a6ba81950d133195617d205;hpb=07f60f25af217a3c619ee8ea270707188bc41d77;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/file/ArchivedFile.php b/includes/filerepo/file/ArchivedFile.php index 8bf90402f1..effa3eeb70 100644 --- a/includes/filerepo/file/ArchivedFile.php +++ b/includes/filerepo/file/ArchivedFile.php @@ -264,6 +264,9 @@ class ArchivedFile { // old row, populate from key $this->sha1 = LocalRepo::getHashFromKey( $this->key ); } + if ( !$this->title ) { + $this->title = Title::makeTitleSafe( NS_FILE, $row->fa_name ); + } } /** @@ -272,6 +275,9 @@ class ArchivedFile { * @return Title */ public function getTitle() { + if ( !$this->title ) { + $this->load(); + } return $this->title; }