Merge "Fix 2017WTE change tag for edits that blank the page"

This commit is contained in:
jenkins-bot 2020-01-06 18:30:29 +00:00 committed by Gerrit Code Review
commit 3e3a84f9b6

View file

@ -429,7 +429,7 @@ class ApiVisualEditorEdit extends ApiVisualEditor {
if ( $this->veConfig->get( 'VisualEditorUseChangeTagging' ) ) {
// Defer till after the RC row is inserted
// @TODO: doEditContent should let callers specify desired tags
$tag = $params['wikitext'] ? 'visualeditor-wikitext' : 'visualeditor';
$tag = isset( $params['wikitext'] ) ? 'visualeditor-wikitext' : 'visualeditor';
DeferredUpdates::addCallableUpdate( function () use ( $tag, $newRevId ) {
ChangeTags::addTags( $tag, null, $newRevId, null );
} );