'LocalFilePurgeThumbnails': called before thumbnails for a local file a purged
$file: the File object
-$type: either "current" or "archive"
+$archiveName: name of an old file version or false if it's the current one
'LocalisationCacheRecache': Called when loading the localisation data into cache
$cache: The LocalisationCache object
}
/**
- * Delete cached transformed files for archived files
+ * Delete cached transformed files for an archived version only.
* @param $archiveName string name of the archived file
*/
function purgeOldThumbnails( $archiveName ) {
wfRestoreWarnings();
// Purge any custom thumbnail caches
- wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, 'archive' ) );
+ wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, $archiveName ) );
// Purge the squid
if ( $wgUseSquid ) {
$this->purgeThumbList( $dir, $files );
// Purge any custom thumbnail caches
- wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, 'current' ) );
+ wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, false ) );
// Purge the squid
if ( $wgUseSquid ) {