Not setting various parameters no longer causes the ForeignAPIRepo to fail horribly...
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 31 Jul 2008 22:06:54 +0000 (22:06 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 31 Jul 2008 22:06:54 +0000 (22:06 +0000)
RELEASE-NOTES
includes/filerepo/FileRepo.php
includes/filerepo/ForeignAPIFile.php

index 90a4083..3a66055 100644 (file)
@@ -47,6 +47,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14954) Fix regression in Modern and Simple skins
 * Recursion loop check added to Categoryfinder class
 * Fixed few performance troubles of large job queue processing
+* Not setting various parameters in Foreign Repos now fails more gracefully
 
 === API changes in 1.14 ===
 
index 64e5c92..23a132e 100644 (file)
@@ -15,6 +15,7 @@ abstract class FileRepo {
        var $thumbScriptUrl, $transformVia404;
        var $descBaseUrl, $scriptDirUrl, $articleUrl, $fetchDescription, $initialCapital;
        var $pathDisclosureProtection = 'paranoid';
+       var $descriptionCacheExpiry, $apiThumbCacheExpiry, $apiThumbCacheDir;
 
        /**
         * Factory functions for creating new files
index 1e332e0..b2b9ddb 100644 (file)
@@ -31,7 +31,7 @@ class ForeignAPIFile extends File {
        }
 
        function transform( $params, $flags = 0 ) {
-               if ( $this->repo->apiThumbCacheExpiry > 0 ) {
+               if ( $this->repo->apiThumbCacheExpiry > 0 && $this->repo->apiThumbCacheDir ) {
                        $thumbUrl = $this->repo->getThumbUrlFromCache(
                                $this->getName(),
                                isset( $params['width'] ) ? $params['width'] : -1,