From: Aaron Schulz Date: Wed, 10 Aug 2016 23:29:10 +0000 (-0700) Subject: Make PurgeChangedFiles actually purge old versions too X-Git-Tag: 1.31.0-rc.0~6104 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=b645d0f8f9b55822ad54a281a57878a5248d85b7;p=lhc%2Fweb%2Fwiklou.git Make PurgeChangedFiles actually purge old versions too Change-Id: I7aa746535ceae7d19c492145c3254d55511a8576 --- diff --git a/maintenance/purgeChangedFiles.php b/maintenance/purgeChangedFiles.php index 5b035e120a..70a26cbdf6 100644 --- a/maintenance/purgeChangedFiles.php +++ b/maintenance/purgeChangedFiles.php @@ -164,8 +164,12 @@ class PurgeChangedFiles extends Maintenance { continue; } - // Purge current version and any versions in oldimage table + // Purge current version and its thumbnails $file->purgeCache(); + // Purge the old versions and their thumbnails + foreach ( $file->getHistory() as $oldFile ) { + $oldFile->purgeCache(); + } if ( $logType === 'delete' ) { // If there is an orphaned storage file... delete it