http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94212

Revision: 94212
Author:   demon
Date:     2011-08-10 23:29:08 +0000 (Wed, 10 Aug 2011)
Log Message:
-----------
(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: trunk/phase3/includes/filerepo/LocalFile.php
===================================================================
--- trunk/phase3/includes/filerepo/LocalFile.php        2011-08-10 23:27:10 UTC 
(rev 94211)
+++ trunk/phase3/includes/filerepo/LocalFile.php        2011-08-10 23:29:08 UTC 
(rev 94212)
@@ -655,6 +655,11 @@
                $hashedName = md5( $this->getName() );
                $oldKey = $this->repo->getSharedCacheKey( 'oldfile', 
$hashedName );
 
+               // Must purge thumbnails for old versions too! bug 30192
+               foreach( $this->getHistory() as $oldFile ) {
+                       $oldFile->purgeThumbnails();
+               }
+
                if ( $oldKey ) {
                        $wgMemc->delete( $oldKey );
                }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to