Merge "WatchAction: Require POST for index.php action=watch"
[lhc/web/wiklou.git] / includes / filerepo / FileRepo.php
index 82bbd76..25e46d8 100644 (file)
@@ -49,6 +49,9 @@ class FileRepo {
        /** @var int */
        public $descriptionCacheExpiry;
 
+       /** @var bool */
+       protected $hasSha1Storage = false;
+
        /** @var FileBackend */
        protected $backend;
 
@@ -750,7 +753,6 @@ class FileRepo {
                }
                if ( !is_null( $this->articleUrl ) ) {
                        # "http://example.com/wiki/$1"
-                       #
                        # We use "Image:" as the canonical namespace for
                        # compatibility across all MediaWiki versions.
                        return str_replace( '$1',
@@ -758,7 +760,6 @@ class FileRepo {
                }
                if ( !is_null( $this->scriptDirUrl ) ) {
                        # "http://example.com/w"
-                       #
                        # We use "Image:" as the canonical namespace for
                        # compatibility across all MediaWiki versions,
                        # and just sort of hope index.php is right. ;)
@@ -1885,6 +1886,14 @@ class FileRepo {
 
                return $ret;
        }
+
+       /**
+        * Returns whether or not storage is SHA-1 based
+        * @return boolean
+        */
+       public function hasSha1Storage() {
+               return $this->hasSha1Storage;
+       }
 }
 
 /**