Call loadPageData() as needed in Title::moveToInternal.
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 21 Mar 2013 07:03:59 +0000 (00:03 -0700)
committerRobLa <robla@wikimedia.org>
Thu, 21 Mar 2013 14:18:58 +0000 (14:18 +0000)
* This avoids use of a slave for loading the page ID to do
  the updates using $newpage. That bug prevented page moves
  by using the old 0 ID and throwing an exception.

Bug: 46397
Change-Id: Iea3259dce6840e3f2959d98a20177acd60433b64

includes/Title.php

index e81023a..84848eb 100644 (file)
@@ -3838,6 +3838,7 @@ class Title {
 
                $this->resetArticleID( 0 );
                $nt->resetArticleID( $oldid );
+               $newpage->loadPageData( WikiPage::READ_LOCKING ); // bug 46397
 
                $newpage->updateRevisionOn( $dbw, $nullRevision );