From 1a9061d9004fc2af59b8aed25f899415a7f940a0 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 3 Mar 2012 12:46:58 +0000 Subject: [PATCH] [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. --- includes/Title.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 ) ); -- 2.20.1