* @ingroup Media
*/
class WikiFilePage extends WikiPage {
- /** @var File */
+ /** @var File|false */
protected $mFile = false;
- /** @var LocalRepo */
+ /** @var LocalRepo|null */
protected $mRepo = null;
/** @var bool */
protected $mFileLoaded = false;
- /** @var array */
+ /** @var array|null */
protected $mDupes = null;
public function __construct( $title ) {
if ( $this->mFile->exists() ) {
wfDebug( 'ImagePage::doPurge purging ' . $this->mFile->getName() . "\n" );
- DeferredUpdates::addUpdate(
- new HTMLCacheUpdate( $this->mTitle, 'imagelinks', 'file-purge' )
+ $job = HTMLCacheUpdateJob::newForBacklinks(
+ $this->mTitle,
+ 'imagelinks',
+ [ 'causeAction' => 'file-purge' ]
);
+ JobQueueGroup::singleton()->lazyPush( $job );
} else {
wfDebug( 'ImagePage::doPurge no image for '
. $this->mFile->getName() . "; limiting purge to cache only\n" );