Make HTMLCacheUpdate callers more consistent
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 1 Dec 2015 00:55:43 +0000 (16:55 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 1 Dec 2015 01:00:01 +0000 (01:00 +0000)
A few random callers were calling doUpdate() themselves
instead of using DeferredUpdates

Change-Id: If121e6afab9899dae92f0bf831b0b0c9967deeb5

includes/deferred/LinksUpdate.php
includes/specials/SpecialUndelete.php

index a6290ed..c253e74 100644 (file)
@@ -948,8 +948,7 @@ class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate {
                                        $inv = array( $inv );
                                }
                                foreach ( $inv as $table ) {
-                                       $update = new HTMLCacheUpdate( $this->mTitle, $table );
-                                       $update->doUpdate();
+                                       DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this->mTitle, $table ) );
                                }
                        }
                }
index 447c3ef..664205a 100644 (file)
@@ -636,8 +636,7 @@ class PageArchive {
                Hooks::run( 'ArticleUndelete', array( &$this->title, $created, $comment, $oldPageId ) );
 
                if ( $this->title->getNamespace() == NS_FILE ) {
-                       $update = new HTMLCacheUpdate( $this->title, 'imagelinks' );
-                       $update->doUpdate();
+                       DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this->title, 'imagelinks' ) );
                }
 
                return Status::newGood( $restored );