r87622 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87621‎ | r87622 | r87623 >
Date:10:24, 7 May 2011
Author:aaron
Status:ok
Tags:
Comment:
(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.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -3272,9 +3272,6 @@
32733273 }
32743274 $nullRevId = $nullRevision->insertOn( $dbw );
32753275
3276 - $article = new Article( $this );
3277 - wfRunHooks( 'NewRevisionFromEditComplete', array( $article, $nullRevision, $latest, $wgUser ) );
3278 -
32793276 # Change the name of the target page:
32803277 $dbw->update( 'page',
32813278 /* SET */ array(
@@ -3288,6 +3285,9 @@
32893286 );
32903287 $nt->resetArticleID( $oldid );
32913288
 3289+ $article = new Article( $nt );
 3290+ wfRunHooks( 'NewRevisionFromEditComplete', array( $article, $nullRevision, $latest, $wgUser ) );
 3291+
32923292 # Recreate the redirect, this time in the other direction.
32933293 if ( $createRedirect || !$wgUser->isAllowed( 'suppressredirect' ) ) {
32943294 $mwRedir = MagicWord::get( 'redirect' );

Status & tagging log