r94212 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94211‎ | r94212 | r94213 >
Date:23:29, 10 August 2011
Author:demon
Status:resolved (Comments)
Tags:
Comment:
(bug 30192) Old thumbnails not properly purged. Unlike the bug suggests, we don't need to also purge from LocalFile::purgeCache(), since that code path ends up calling purgeHistory() anyway.

A lot of this could probably be protected...not much calls these outside of FileRepo code other than File::purgeCache()
Modified paths:
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -655,6 +655,11 @@
656656 $hashedName = md5( $this->getName() );
657657 $oldKey = $this->repo->getSharedCacheKey( 'oldfile', $hashedName );
658658
 659+ // Must purge thumbnails for old versions too! bug 30192
 660+ foreach( $this->getHistory() as $oldFile ) {
 661+ $oldFile->purgeThumbnails();
 662+ }
 663+
659664 if ( $oldKey ) {
660665 $wgMemc->delete( $oldKey );
661666 }

Sign-offs

UserFlagDate
Catropeinspected09:33, 11 August 2011
Bryaninspected12:58, 12 August 2011 (struck 13:23, 12 August 2011)

Follow-up revisions

RevisionCommit summaryAuthorDate
r96373(bug 30192) Thumbnails of archived images don't get deleted. Patch by Russ an...demon21:01, 6 September 2011
r96536copyover: Don't ship with LocalSettings.php; Strip out secrets from proxy.co...nelson01:21, 8 September 2011
r96842REL1_18: MFT r93288, r94212, r96261, r96263, r96384reedy14:42, 12 September 2011
r968561.17wmf1: MFT r94212, r96373, r96386, r96389, r96420, r96645...reedy15:35, 12 September 2011

Comments

#Comment by Bryan (talk | contribs)   13:25, 12 August 2011

purgeHistory() is not actually called by File::purgeEverything().

Also the function description of LocalFile::purgeMetadataCache() is not valid anymore.

#Comment by 😂 (talk | contribs)   21:03, 6 September 2011

Should be fine with the followup, setting back to new.

Status & tagging log