From: Aaron Schulz Date: Sat, 3 Mar 2012 12:46:58 +0000 (+0000) Subject: [Title] In moveToInternal(), just use getParentId() on the null revision object as... X-Git-Tag: 1.31.0-rc.0~24418 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=1a9061d9004fc2af59b8aed25f899415a7f940a0;p=lhc%2Fweb%2Fwiklou.git [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. --- diff --git a/includes/Title.php b/includes/Title.php index a2a3fa475c..218ac2f742 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3595,7 +3595,6 @@ class Title { $comment = $wgContLang->truncate( $comment, 255 ); $oldid = $this->getArticleID(); - $latest = $this->getLatestRevID(); $dbw = wfGetDB( DB_MASTER ); @@ -3636,7 +3635,7 @@ class Title { $newpage->updateRevisionOn( $dbw, $nullRevision ); wfRunHooks( 'NewRevisionFromEditComplete', - array( $newpage, $nullRevision, $latest, $wgUser ) ); + array( $newpage, $nullRevision, $nullRevision->getParentId(), $wgUser ) ); $newpage->doEditUpdates( $nullRevision, $wgUser, array( 'changed' => false ) );