From: Aaron Schulz Date: Wed, 8 Apr 2015 16:35:56 +0000 (-0700) Subject: Prevent SiteStats::loadAndLazyInit from reloading in $wgMiserMode X-Git-Tag: 1.31.0-rc.0~11788 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/wiki/supprimer.php?a=commitdiff_plain;h=ff88ba3c5ff639653160c8dcbb3b0ab358d5d15a;p=lhc%2Fweb%2Fwiklou.git Prevent SiteStats::loadAndLazyInit from reloading in $wgMiserMode * Large sites can use a chron to handle accumulated drift Bug: T95426 Change-Id: I59603a7aa329a10f8a7e4d11f3496e8f8243ca42 --- diff --git a/includes/SiteStats.php b/includes/SiteStats.php index 15c18f359b..81172a14f7 100644 --- a/includes/SiteStats.php +++ b/includes/SiteStats.php @@ -68,6 +68,8 @@ class SiteStats { * @return bool|ResultWrapper */ static function loadAndLazyInit() { + global $wgMiserMode; + wfDebug( __METHOD__ . ": reading site_stats from slave\n" ); $row = self::doLoad( wfGetDB( DB_SLAVE ) ); @@ -77,7 +79,7 @@ class SiteStats { $row = self::doLoad( wfGetDB( DB_MASTER ) ); } - if ( !self::isSane( $row ) ) { + if ( !$wgMiserMode && !self::isSane( $row ) ) { // Normally the site_stats table is initialized at install time. // Some manual construction scenarios may leave the table empty or // broken, however, for instance when importing from a dump into a