&updater: A DatabaseUpdater subclass
'LocalFile::getHistory': called before file history query performed
-$file: the file
+$file: the File object
$tables: tables
$fields: select fields
$conds: conditions
$opts: query options
$join_conds: JOIN conditions
+'LocalFilePurgeThumbnails': called before thumbnails for a local file a purged
+$file: the File object
+$type: either "current" or "archive"
+
'LocalisationCacheRecache': Called when loading the localisation data into cache
$cache: The LocalisationCache object
$code: language code
*/
function purgeOldThumbnails( $archiveName ) {
global $wgUseSquid;
- // get a list of old thumbnails and URLs
+ // Get a list of old thumbnails and URLs
$files = $this->getThumbnails( $archiveName );
$dir = array_shift( $files );
$this->purgeThumbList( $dir, $files );
}
wfRestoreWarnings();
- # Temporary hook for purging Swift thumbnail cache
- wfRunHooks( 'LocalFilePurgeThumbnails', array( $dir, 'old' ) );
+ // Purge any custom thumbnail caches
+ wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, 'archive' ) );
// Purge the squid
if ( $wgUseSquid ) {
$dir = array_shift( $files );
$this->purgeThumbList( $dir, $files );
- # Temporary hook for purging Swift thumbnail cache
- wfRunHooks( 'LocalFilePurgeThumbnails', array( $dir, 'current' ) );
+ // Purge any custom thumbnail caches
+ wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, 'current' ) );
// Purge the squid
if ( $wgUseSquid ) {