X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2Ffile%2FLocalFile.php;h=609a8fb5af1ccda7cec2a9ba1ff9d1d7b7d5efc3;hb=b5656b6953888ceae07889d1e3b96c42d824990e;hp=0a3ded748fd5bdf19a610d844dd56473282432aa;hpb=27d3f08d4e41ca5745c80a57afd441f9250db7e1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 0a3ded748f..609a8fb5af 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -915,6 +915,7 @@ class LocalFile extends File { // Purge any custom thumbnail caches Hooks::run( 'LocalFilePurgeThumbnails', [ $this, $archiveName ] ); + // Delete thumbnails $dir = array_shift( $files ); $this->purgeThumbList( $dir, $files ); @@ -931,7 +932,6 @@ class LocalFile extends File { * @param array $options */ public function purgeThumbnails( $options = [] ) { - // Delete thumbnails $files = $this->getThumbnails(); // Always purge all files from CDN regardless of handler filters $urls = []; @@ -951,6 +951,7 @@ class LocalFile extends File { // Purge any custom thumbnail caches Hooks::run( 'LocalFilePurgeThumbnails', [ $this, false ] ); + // Delete thumbnails $dir = array_shift( $files ); $this->purgeThumbList( $dir, $files ); @@ -2770,7 +2771,7 @@ class LocalFileMoveBatch { $this->newName = $this->file->repo->getNameFromTitle( $this->target ); $this->oldRel = $this->oldHash . $this->oldName; $this->newRel = $this->newHash . $this->newName; - $this->db = $file->getRepo()->getMasterDb(); + $this->db = $file->getRepo()->getMasterDB(); } /**