Use RecentChange::addTags rather than ChangeTags::addTags

To avoid consecutive DB writes on changetag table.
See I8df2fd983c12632337e8d2922fa357808482338c

Change-Id: I246b26ff1506b0ba82ef4eb08e06e3ef59ff8cad
This commit is contained in:
cenarium 2016-09-27 17:36:28 +02:00
parent 2cb81c9973
commit 0dfadc057d

View file

@ -389,8 +389,7 @@ class VisualEditorHooks {
public static function onRecentChange_save( RecentChange $rc ) { public static function onRecentChange_save( RecentChange $rc ) {
$request = RequestContext::getMain()->getRequest(); $request = RequestContext::getMain()->getRequest();
if ( $request->getBool( 'veswitched' ) && $rc->mAttribs['rc_this_oldid'] ) { if ( $request->getBool( 'veswitched' ) && $rc->mAttribs['rc_this_oldid'] ) {
ChangeTags::addTags( 'visualeditor-switched', $rc->addTags( 'visualeditor-switched' );
$rc->mAttribs['rc_id'], $rc->mAttribs['rc_this_oldid'] );
} }
return true; return true;
} }