From 0dfadc057d0e146ddd21ac2d6438228c13eeb9e7 Mon Sep 17 00:00:00 2001 From: cenarium Date: Tue, 27 Sep 2016 17:36:28 +0200 Subject: [PATCH] Use RecentChange::addTags rather than ChangeTags::addTags To avoid consecutive DB writes on changetag table. See I8df2fd983c12632337e8d2922fa357808482338c Change-Id: I246b26ff1506b0ba82ef4eb08e06e3ef59ff8cad --- VisualEditor.hooks.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 0d6dc14a24..28337c3fd8 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -389,8 +389,7 @@ class VisualEditorHooks { public static function onRecentChange_save( RecentChange $rc ) { $request = RequestContext::getMain()->getRequest(); if ( $request->getBool( 'veswitched' ) && $rc->mAttribs['rc_this_oldid'] ) { - ChangeTags::addTags( 'visualeditor-switched', - $rc->mAttribs['rc_id'], $rc->mAttribs['rc_this_oldid'] ); + $rc->addTags( 'visualeditor-switched' ); } return true; }