r112947 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112946‎ | r112947 | r112948 >
Date:12:46, 3 March 2012
Author:aaron
Status:ok
Tags:
Comment:
[Title] In moveToInternal(), just use getParentId() on the null revision object as the base ID rather than $latest. They should conceptually be the same but the former was already fetched with master data.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -3595,7 +3595,6 @@
35963596 $comment = $wgContLang->truncate( $comment, 255 );
35973597
35983598 $oldid = $this->getArticleID();
3599 - $latest = $this->getLatestRevID();
36003599
36013600 $dbw = wfGetDB( DB_MASTER );
36023601
@@ -3636,7 +3635,7 @@
36373636 $newpage->updateRevisionOn( $dbw, $nullRevision );
36383637
36393638 wfRunHooks( 'NewRevisionFromEditComplete',
3640 - array( $newpage, $nullRevision, $latest, $wgUser ) );
 3639+ array( $newpage, $nullRevision, $nullRevision->getParentId(), $wgUser ) );
36413640
36423641 $newpage->doEditUpdates( $nullRevision, $wgUser, array( 'changed' => false ) );
36433642

Sign-offs

UserFlagDate
Krinkleinspected03:48, 12 March 2012

Status & tagging log