Changed new LocalFilePurgeThumbnails hook arguments and updated wmf/swift.php to actually work for archived file thumbs.
This commit is contained in:
parent
b39e54f407
commit
f00af516ab
2 changed files with 4 additions and 4 deletions
|
|
@ -1191,7 +1191,7 @@ $join_conds: JOIN conditions
|
||||||
|
|
||||||
'LocalFilePurgeThumbnails': called before thumbnails for a local file a purged
|
'LocalFilePurgeThumbnails': called before thumbnails for a local file a purged
|
||||||
$file: the File object
|
$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
|
'LocalisationCacheRecache': Called when loading the localisation data into cache
|
||||||
$cache: The LocalisationCache object
|
$cache: The LocalisationCache object
|
||||||
|
|
|
||||||
|
|
@ -687,7 +687,7 @@ class LocalFile extends File {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete cached transformed files for archived files
|
* Delete cached transformed files for an archived version only.
|
||||||
* @param $archiveName string name of the archived file
|
* @param $archiveName string name of the archived file
|
||||||
*/
|
*/
|
||||||
function purgeOldThumbnails( $archiveName ) {
|
function purgeOldThumbnails( $archiveName ) {
|
||||||
|
|
@ -707,7 +707,7 @@ class LocalFile extends File {
|
||||||
wfRestoreWarnings();
|
wfRestoreWarnings();
|
||||||
|
|
||||||
// Purge any custom thumbnail caches
|
// Purge any custom thumbnail caches
|
||||||
wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, 'archive' ) );
|
wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, $archiveName ) );
|
||||||
|
|
||||||
// Purge the squid
|
// Purge the squid
|
||||||
if ( $wgUseSquid ) {
|
if ( $wgUseSquid ) {
|
||||||
|
|
@ -732,7 +732,7 @@ class LocalFile extends File {
|
||||||
$this->purgeThumbList( $dir, $files );
|
$this->purgeThumbList( $dir, $files );
|
||||||
|
|
||||||
// Purge any custom thumbnail caches
|
// Purge any custom thumbnail caches
|
||||||
wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, 'current' ) );
|
wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, false ) );
|
||||||
|
|
||||||
// Purge the squid
|
// Purge the squid
|
||||||
if ( $wgUseSquid ) {
|
if ( $wgUseSquid ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue