summaryrefslogtreecommitdiff
path: root/includes/SiteStats.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
commit370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch)
tree491674f4c242e4d6ba0d04eafa305174c35a3391 /includes/SiteStats.php
parentf4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff)
Update auf 1.13.0
Diffstat (limited to 'includes/SiteStats.php')
-rw-r--r--includes/SiteStats.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/includes/SiteStats.php b/includes/SiteStats.php
index d7b9161a..3b10f4a0 100644
--- a/includes/SiteStats.php
+++ b/includes/SiteStats.php
@@ -27,10 +27,10 @@ class SiteStats {
$dbr = wfGetDB( DB_SLAVE );
self::$row = $dbr->selectRow( 'site_stats', '*', false, __METHOD__ );
}
-
+
self::$loaded = true;
}
-
+
static function loadAndLazyInit() {
wfDebug( __METHOD__ . ": reading site_stats from slave\n" );
$row = self::doLoad( wfGetDB( DB_SLAVE ) );
@@ -40,24 +40,24 @@ class SiteStats {
wfDebug( __METHOD__ . ": site_stats damaged or missing on slave\n" );
$row = self::doLoad( wfGetDB( DB_MASTER ) );
}
-
+
if( !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
// clean schema with mwdumper.
wfDebug( __METHOD__ . ": initializing damaged or missing site_stats\n" );
-
+
global $IP;
require_once "$IP/maintenance/initStats.inc";
-
+
ob_start();
wfInitStats();
ob_end_clean();
-
+
$row = self::doLoad( wfGetDB( DB_MASTER ) );
}
-
+
if( !self::isSane( $row ) ) {
wfDebug( __METHOD__ . ": site_stats persistently nonsensical o_O\n" );
}
@@ -92,7 +92,7 @@ class SiteStats {
self::load();
return self::$row->ss_users;
}
-
+
static function images() {
self::load();
return self::$row->ss_images;
@@ -117,7 +117,7 @@ class SiteStats {
}
return self::$jobs;
}
-
+
static function pagesInNs( $ns ) {
wfProfileIn( __METHOD__ );
if( !isset( self::$pageCount[$ns] ) ) {
@@ -236,4 +236,3 @@ class SiteStatsUpdate {
*/
}
}
-