[Title] In moveToInternal(), just use getParentId() on the null revision object as...
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 3 Mar 2012 12:46:58 +0000 (12:46 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 3 Mar 2012 12:46:58 +0000 (12:46 +0000)
includes/Title.php

index a2a3fa4..218ac2f 100644 (file)
@@ -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 ) );