X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Ffilerepo%2Ffile%2FFile.php;h=60d4e29dac5ac0fe7daf03202bc54e226a7f388b;hp=d14e0ded00e6d8e30784be368c2572b0275a2d99;hb=e19e6bfabcaf2b6aa5dd837ff7057bd6a25baef8;hpb=e209dcf11e16ca57306fe450277477a6bfd8480a diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index d14e0ded00..60d4e29dac 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1172,6 +1172,7 @@ abstract class File implements IDBAccessObject { $thumb = false; } elseif ( $thumb->isError() ) { // transform error /** @var MediaTransformError $thumb */ + '@phan-var MediaTransformError $thumb'; $this->lastError = $thumb->toText(); // Ignore errors if requested if ( $wgIgnoreImageErrors && !( $flags & self::RENDER_NOW ) ) { @@ -1466,13 +1467,15 @@ abstract class File implements IDBAccessObject { // Delete thumbnails and refresh file metadata cache $this->purgeCache(); $this->purgeDescription(); - // Purge cache of all pages using this file $title = $this->getTitle(); if ( $title ) { - DeferredUpdates::addUpdate( - new HTMLCacheUpdate( $title, 'imagelinks', 'file-purge' ) + $job = HTMLCacheUpdateJob::newForBacklinks( + $title, + 'imagelinks', + [ 'causeAction' => 'file-purge' ] ); + JobQueueGroup::singleton()->lazyPush( $job ); } }