* Add row to the redirect table if this is a redirect, remove otherwise.
*
* @param IDatabase $dbw
- * @param Title $redirectTitle Title object pointing to the redirect target,
+ * @param Title|null $redirectTitle Title object pointing to the redirect target,
* or NULL if this is not a redirect
* @param null|bool $lastRevIsRedirect If given, will optimize adding and
* removing rows in redirect table.
$tags[] = $tag;
}
+ // Check for undo tag
+ if ( $undidRevId !== 0 && in_array( 'mw-undo', ChangeTags::getSoftwareTags() ) ) {
+ $tags[] = 'mw-undo';
+ }
+
// Provide autosummaries if summary is not provided and autosummaries are enabled
if ( $wgUseAutomaticEditSummaries && ( $flags & EDIT_AUTOSUMMARY ) && $summary == '' ) {
$summary = $handler->getAutosummary( $old_content, $content, $flags );