From: This, that and the other Date: Tue, 22 Jul 2014 02:02:39 +0000 (+1000) Subject: Use master DB to check for page existence during import X-Git-Tag: 1.31.0-rc.0~14741 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=0afc858296811d447370855c372489a5e1e0ae5e;p=lhc%2Fweb%2Fwiklou.git Use master DB to check for page existence during import By default, slaves are used for the existence check. However, in the case of importing many revisions of the one page, the chances are that they won't have caught up to the fact that that page has just been created, causing site statistics to be incorrectly updated. We need to use the master DB for this check. Bug: 40009 Change-Id: I301353fb976a982f58635b87d9960d81fc541d14 --- diff --git a/includes/Import.php b/includes/Import.php index 8eab3be001..1448279940 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -1503,6 +1503,7 @@ class WikiRevision { $linkCache->clear(); $page = WikiPage::factory( $this->title ); + $page->loadPageData( 'fromdbmaster' ); if ( !$page->exists() ) { # must create the page... $pageId = $page->insertOn( $dbw );