From: Aaron Schulz Date: Sat, 7 May 2011 10:24:38 +0000 (+0000) Subject: (bug 28667) "old title gets two review log entries after move". Fixed this by firing... X-Git-Tag: 1.31.0-rc.0~30352 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=888e7790a8eee8e8b8ffb22ac0dcd30b9970f93b;p=lhc%2Fweb%2Fwiklou.git (bug 28667) "old title gets two review log entries after move". Fixed this by firing the revisionfromedit hook on the new title, which makes a bit more sense. --- diff --git a/includes/Title.php b/includes/Title.php index 88ec68eaf7..d1597258da 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3272,9 +3272,6 @@ class Title { } $nullRevId = $nullRevision->insertOn( $dbw ); - $article = new Article( $this ); - wfRunHooks( 'NewRevisionFromEditComplete', array( $article, $nullRevision, $latest, $wgUser ) ); - # Change the name of the target page: $dbw->update( 'page', /* SET */ array( @@ -3288,6 +3285,9 @@ class Title { ); $nt->resetArticleID( $oldid ); + $article = new Article( $nt ); + wfRunHooks( 'NewRevisionFromEditComplete', array( $article, $nullRevision, $latest, $wgUser ) ); + # Recreate the redirect, this time in the other direction. if ( $createRedirect || !$wgUser->isAllowed( 'suppressredirect' ) ) { $mwRedir = MagicWord::get( 'redirect' );