$reason = wfMessage( 'double-redirect-fixed-' . $this->reason,
$this->redirTitle->getPrefixedText(), $newTitle->getPrefixedText()
)->inContentLanguage()->text();
- $article->doEditContent( $newContent, $reason, EDIT_UPDATE | EDIT_SUPPRESS_RC, false, $user );
+ $flags = EDIT_UPDATE | EDIT_SUPPRESS_RC | EDIT_INTERNAL;
+ $article->doEditContent( $newContent, $reason, $flags, false, $user );
$wgUser = $oldUser;
return true;
*
* @param Title $title
*
- * @return bool If the specified title is not a redirect, or if it is a circular redirect
+ * @return Title|bool The final Title after following all redirects, or false if
+ * the page is not a redirect or the redirect loops.
*/
public static function getFinalDestination( $title ) {
$dbw = wfGetDB( DB_MASTER );