Merge "$wgHooks: add closure docs & admonition to register handlers early"
[lhc/web/wiklou.git] / includes / revisiondelete / RevisionDelete.php
index 135e31f..191286d 100644 (file)
@@ -498,11 +498,19 @@ class RevDel_FileList extends RevDel_List {
        }
 
        public function doPostCommitUpdates() {
+               global $wgUseSquid;
                $file = wfLocalFile( $this->title );
                $file->purgeCache();
                $file->purgeDescription();
+               $purgeUrls = array();
                foreach ( $this->ids as $timestamp ) {
-                       $file->purgeOldThumbnails( $timestamp . '!' . $this->title->getDBkey() );
+                       $archiveName = $timestamp . '!' . $this->title->getDBkey();
+                       $file->purgeOldThumbnails( $archiveName );
+                       $purgeUrls[] = $file->getArchiveUrl( $archiveName );
+               }
+               if ( $wgUseSquid ) {
+                       // purge full images from cache
+                       SquidUpdate::purge( $purgeUrls );
                }
                return Status::newGood();
        }