From 759fa18c8a1a25cf91e2353fa69b5f0cd5112462 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 24 Apr 2009 23:11:07 +0000 Subject: [PATCH] (bug 18571) Purging image should always clear metadata cache. Sometimes the metadata is stale and the image does in fact exist. Patch by nephele. --- CREDITS | 1 + RELEASE-NOTES | 13 +++++++------ includes/ImagePage.php | 5 ++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CREDITS b/CREDITS index f43ecca865..fb64629400 100644 --- a/CREDITS +++ b/CREDITS @@ -83,6 +83,7 @@ following names for their contribution to the product. * Mormegil * Nakon * Nathan Larson +* nephele * Nikolaos S. Karastathis * Olaf Lenz * Paul Copperman diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 16e1410deb..e6f6102afd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -360,12 +360,13 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN revisions when --delete is not passed * (bug 13172) GPS coordinates in image Exif data are now actually displayed * Overhaul of preferences system, includes the following bug fixes: - * (bug 5363) Changes to default preferences now impact registered users. - * (bug 14806) Hook to enable putting preferences in existing tabs. - * (bug 17191) Registration date now listed on preferences page. - * Note that this change will break some extensions which have not been adapted - for it. -* (bug 17020) Adding fallback encodings for Traditional and Simplified Chinese languages while the the text is typed as URLs. +* (bug 5363) Changes to default preferences now impact registered users. +* (bug 14806) Hook to enable putting preferences in existing tabs. +* (bug 17191) Registration date now listed on preferences page. +* Note that this change will break some extensions which have not been adapted + for it. +* (bug 17020) Adding fallback encodings for Traditional and Simplified Chinese + languages while the the text is typed as URLs. == API changes in 1.15 == * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 800c418f49..d1e4649047 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -697,7 +697,10 @@ EOT $this->img->upgradeRow(); $this->img->purgeCache(); } else { - wfDebug( "ImagePage::doPurge no image\n" ); + wfDebug( "ImagePage::doPurge no image for " . $this->img->getName() . "; limiting purge to cache only\n" ); + // even if the file supposedly doesn't exist, force any cached information + // to be updated (in case the cached information is wrong) + $this->img->purgeCache(); } parent::doPurge(); } -- 2.20.1