From d3f5c943eaa9681f4dcb2a1eb3a1fd2b4894fcd6 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 21 Sep 2015 16:22:37 -0700 Subject: [PATCH] Removed DeferredUpdates::addHTMLCacheUpdate() * That method does not belong in DeferredUpdates as this class should agnostic to the work done Change-Id: I8098ffb82bf9c33ccb48a31aa9dbad514e8724a8 --- RELEASE-NOTES-1.26 | 1 + includes/deferred/DeferredUpdates.php | 11 ----------- includes/page/WikiPage.php | 4 ++-- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26 index bf07b2056d..19309a80d6 100644 --- a/RELEASE-NOTES-1.26 +++ b/RELEASE-NOTES-1.26 @@ -189,6 +189,7 @@ changes to languages because of Phabricator reports. extension instead. New tokens types should not be added. * DatabaseBase::errorCount() was removed (unused). * $wgDeferredUpdateList was removed. +* DeferredUpdates::addHTMLCacheUpdate() was removed. == Compatibility == diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index 713ce70b3f..cd0266f6b8 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -78,17 +78,6 @@ class DeferredUpdates { } } - /** - * HTMLCacheUpdates are the most common deferred update people use. This - * is a shortcut method for that. - * @see HTMLCacheUpdate::__construct() - * @param Title $title - * @param string $table - */ - public static function addHTMLCacheUpdate( $title, $table ) { - self::addUpdate( new HTMLCacheUpdate( $title, $table ) ); - } - /** * Add a callable update. In a lot of cases, we just need a callback/closure, * defining a new DeferrableUpdate object is not necessary diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 30590cfada..ddda1305d5 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3219,10 +3219,10 @@ class WikiPage implements Page, IDBAccessObject { */ public static function onArticleEdit( Title $title, Revision $revision = null ) { // Invalidate caches of articles which include this page - DeferredUpdates::addHTMLCacheUpdate( $title, 'templatelinks' ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'templatelinks' ) ); // Invalidate the caches of all pages which redirect here - DeferredUpdates::addHTMLCacheUpdate( $title, 'redirect' ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'redirect' ) ); // Purge squid for this page only $title->purgeSquid(); -- 2.20.1