From: Aaron Schulz Date: Thu, 21 Mar 2013 23:06:45 +0000 (-0700) Subject: Call loadFromRow() as needed in Title::moveToInternal. X-Git-Tag: 1.31.0-rc.0~20258 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=860878789796ebf5edcd50a3864e4fa1d214a391;p=lhc%2Fweb%2Fwiklou.git Call loadFromRow() as needed in Title::moveToInternal. * Follows up 61c0064de538c3b1ea61470eadd88fab87d3513e, which was missing a load call to fully fix the bug. Calling loadFromRow() forced the page to load as non-existing (which it should be). * The redirect title was triggering a load from a slave in updateRevisionOn() and wrongly updating the destination page to point to the redirect revision and leaving the redirect page with page_latest=0; Bug : 46397 Change-Id: Id6abe062a0266a790716df8c592911fd89b83223 --- diff --git a/includes/Title.php b/includes/Title.php index 84848eb42f..bfbb06ff96 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3856,6 +3856,7 @@ class Title { WikiPage::onArticleDelete( $this ); } else { $redirectArticle = WikiPage::factory( $this ); + $redirectArticle->loadFromRow( false, WikiPage::READ_LOCKING ); // bug 46397 $newid = $redirectArticle->insertOn( $dbw ); if ( $newid ) { // sanity $redirectRevision = new Revision( array(