(bug 30192) Old thumbnails not properly purged. Unlike the bug suggests, we don't...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 10 Aug 2011 23:29:08 +0000 (23:29 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 10 Aug 2011 23:29:08 +0000 (23:29 +0000)
A lot of this could probably be protected...not much calls these outside of FileRepo code other than File::purgeCache()

includes/filerepo/LocalFile.php

index e940fd4..d879f07 100644 (file)
@@ -655,6 +655,11 @@ class LocalFile extends File {
                $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 );
                }