From df2eed2b616298e9b9db8ad38b3ec27d075b0fce Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 31 Jul 2008 22:06:54 +0000 Subject: [PATCH] Not setting various parameters no longer causes the ForeignAPIRepo to fail horribly. Thanks to Siebrand for pointing it out. --- RELEASE-NOTES | 1 + includes/filerepo/FileRepo.php | 1 + includes/filerepo/ForeignAPIFile.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) 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, -- 2.20.1