From fe019f85688f9ef26ad595cd7b0c8703c7d4424a Mon Sep 17 00:00:00 2001 From: Prod Date: Wed, 12 Mar 2014 22:05:51 -0400 Subject: [PATCH] Execute LocalFilePurgeThumbnails hook before purging thumbnails bug: 62273 Change-Id: I08ae902debb36039d2c0be829eec07a109e70a24 --- includes/filerepo/file/LocalFile.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index c7b257a6ba..cfa26b0fed 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -903,12 +903,13 @@ class LocalFile extends File { // Get a list of old thumbnails and URLs $files = $this->getThumbnails( $archiveName ); - $dir = array_shift( $files ); - $this->purgeThumbList( $dir, $files ); // Purge any custom thumbnail caches wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, $archiveName ) ); + $dir = array_shift( $files ); + $this->purgeThumbList( $dir, $files ); + // Purge the squid if ( $wgUseSquid ) { $urls = array(); @@ -947,12 +948,12 @@ class LocalFile extends File { } } - $dir = array_shift( $files ); - $this->purgeThumbList( $dir, $files ); - // Purge any custom thumbnail caches wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, false ) ); + $dir = array_shift( $files ); + $this->purgeThumbList( $dir, $files ); + // Purge the squid if ( $wgUseSquid ) { SquidUpdate::purge( $urls ); -- 2.20.1