(bug 23666) FileRepo: Moved File::isLocal() to FileRepo::isLocal(). Patch by Umherirr...
[lhc/web/wiklou.git] / includes / filerepo / FileRepo.php
index 957930e..c97423c 100644 (file)
@@ -621,7 +621,7 @@ abstract class FileRepo {
         */
        public function getDisplayName() {
                // We don't name our own repo, return nothing
-               if ( $this->name == 'local' ) {
+               if ( $this->isLocal() ) {
                        return null;
                }
                // 'shared-repo-name-wikimediacommons' is used when $wgUseInstantCommons = true
@@ -632,6 +632,16 @@ abstract class FileRepo {
                return wfMsg( 'shared-repo' );
        }
 
+       /**
+        * Returns true if this the local file repository.
+        *
+        * @return bool
+        */
+       function isLocal() {
+               return $this->getName() == 'local';
+       }
+
+
        /**
         * Get a key on the primary cache for this repository.
         * Returns false if the repository's cache is not accessible at this site.