Add JavaScript variable wgContentNamespaces
[lhc/web/wiklou.git] / includes / filerepo / ForeignAPIRepo.php
index b4db653..bb16c8b 100644 (file)
@@ -52,13 +52,17 @@ class ForeignAPIRepo extends FileRepo {
                'timestamp',
        );
 
-       var $fileFactory = array( 'ForeignAPIFile', 'newFromTitle' );
-       /* Check back with Commons after a day */
-       var $apiThumbCacheExpiry = 86400; /* 24*60*60 */
-       /* Redownload thumbnail files after a month */
-       var $fileCacheExpiry = 2592000; /* 86400*30 */
+       protected $fileFactory = array( 'ForeignAPIFile', 'newFromTitle' );
+       /** @var int Check back with Commons after a day (24*60*60) */
+       protected $apiThumbCacheExpiry = 86400;
 
-       protected $mQueryCache = array();
+       /** @var int Redownload thumbnail files after a month (86400*30) */
+       protected $fileCacheExpiry = 2592000;
+
+       /** @var array  */
+       private $mQueryCache = array();
+
+       /** @var array  */
        protected $mFileExists = array();
 
        /**
@@ -316,7 +320,8 @@ class ForeignAPIRepo extends FileRepo {
         * @param string $name is a dbkey form of a title
         * @param $width
         * @param $height
-        * @param string $params Other rendering parameters (page number, etc) from handler's makeParamString.
+        * @param string $params Other rendering parameters (page number, etc)
+        *   from handler's makeParamString.
         * @return bool|string
         */
        function getThumbUrlFromCache( $name, $width, $height, $params = "" ) {
@@ -365,7 +370,8 @@ class ForeignAPIRepo extends FileRepo {
                }
                $localPath = $this->getZonePath( 'thumb' ) . "/" . $this->getHashPath( $name ) . $name;
                $localFilename = $localPath . "/" . $fileName;
-               $localUrl = $this->getZoneUrl( 'thumb' ) . "/" . $this->getHashPath( $name ) . rawurlencode( $name ) . "/" . rawurlencode( $fileName );
+               $localUrl = $this->getZoneUrl( 'thumb' ) . "/" . $this->getHashPath( $name ) .
+                       rawurlencode( $name ) . "/" . rawurlencode( $fileName );
 
                if ( $backend->fileExists( array( 'src' => $localFilename ) )
                        && isset( $metadata['timestamp'] )