From: Gergő Tisza Date: Tue, 1 Apr 2014 22:55:47 +0000 (+0000) Subject: Return $wgSitename as displayname for local repo in filerepoinfo API X-Git-Tag: 1.31.0-rc.0~15893^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=277ecacff2aa0ecd343a181605dff87e660b5f83;p=lhc%2Fweb%2Fwiklou.git Return $wgSitename as displayname for local repo in filerepoinfo API displayname is used in user interface texts to tell the user what is the source of a file so returning null does not make sense here. Bug: 64800 Change-Id: Iafbc1a8e63b512d1515215fa1295e5b7434f1861 --- diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 888af377be..90c350b3f7 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -1734,9 +1734,10 @@ class FileRepo { * @return string */ public function getDisplayName() { - // We don't name our own repo, return nothing + global $wgSitename; + if ( $this->isLocal() ) { - return null; + return $wgSitename; } // 'shared-repo-name-wikimediacommons' is used when $wgUseInstantCommons = true