(bug 28667) "old title gets two review log entries after move". Fixed this by firing...
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 7 May 2011 10:24:38 +0000 (10:24 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 7 May 2011 10:24:38 +0000 (10:24 +0000)
includes/Title.php

index 88ec68e..d159725 100644 (file)
@@ -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' );