Return $wgSitename as displayname for local repo in filerepoinfo API
authorGergő Tisza <tgr.huwiki@gmail.com>
Tue, 1 Apr 2014 22:55:47 +0000 (22:55 +0000)
committerRillke <rillke@wikipedia.de>
Sat, 3 May 2014 18:37:06 +0000 (18:37 +0000)
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

includes/filerepo/FileRepo.php

index 888af37..90c350b 100644 (file)
@@ -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