Revert "Add small HtmlCacheUpdater service class to normalize purging code"
[lhc/web/wiklou.git] / includes / page / PageArchive.php
index 19e417a..d69a433 100644 (file)
@@ -756,14 +756,10 @@ class PageArchive {
 
                        Hooks::run( 'ArticleUndelete',
                                [ &$this->title, $created, $comment, $oldPageId, $restoredPages ] );
-
                        if ( $this->title->getNamespace() == NS_FILE ) {
-                               $job = HTMLCacheUpdateJob::newForBacklinks(
-                                       $this->title,
-                                       'imagelinks',
-                                       [ 'causeAction' => 'imagelinks', 'causeAgent' => 'file-restore' ]
+                               DeferredUpdates::addUpdate(
+                                       new HTMLCacheUpdate( $this->title, 'imagelinks', 'file-restore' )
                                );
-                               JobQueueGroup::singleton()->lazyPush( $job );
                        }
                }