From: Chad Horohoe Date: Thu, 31 Jul 2008 22:06:54 +0000 (+0000) Subject: Not setting various parameters no longer causes the ForeignAPIRepo to fail horribly... X-Git-Tag: 1.31.0-rc.0~46241 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=df2eed2b616298e9b9db8ad38b3ec27d075b0fce;p=lhc%2Fweb%2Fwiklou.git Not setting various parameters no longer causes the ForeignAPIRepo to fail horribly. Thanks to Siebrand for pointing it out. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 90a4083500..3a660559ee 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 64e5c925a3..23a132eae5 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -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 diff --git a/includes/filerepo/ForeignAPIFile.php b/includes/filerepo/ForeignAPIFile.php index 1e332e00cd..b2b9ddb99a 100644 --- a/includes/filerepo/ForeignAPIFile.php +++ b/includes/filerepo/ForeignAPIFile.php @@ -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,