Use RecentChange::addTags rather than ChangeTags::addTags

To avoid consecutive DB writes on changetag table.
See I8df2fd983c12632337e8d2922fa357808482338c

Change-Id: Id168581956001902f1c02727a6692f5d65b262e9
This commit is contained in:
cenarium 2016-09-25 21:51:56 +02:00
parent 958de0a18a
commit 782a25937e

View file

@ -466,16 +466,8 @@ class AbuseFilterHooks {
$title->getPrefixedText(), $recentChange->mAttribs['rc_user_text'], $action
) );
if ( !empty( AbuseFilter::$tagsToSet[$actionID] ) ) {
$tags = AbuseFilter::$tagsToSet[$actionID];
if ( count( $tags ) ) {
ChangeTags::addTags(
$tags,
$recentChange->mAttribs['rc_id'],
$recentChange->mAttribs['rc_this_oldid'],
$recentChange->mAttribs['rc_logid']
);
}
if ( isset( AbuseFilter::$tagsToSet[$actionID] ) ) {
$recentChange->addTags( AbuseFilter::$tagsToSet[$actionID] );
}
return true;