From 542ee5844186f88f2892130f6be5678ff3129b09 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 25 May 2011 20:57:15 +0000 Subject: [PATCH] We check self::$pageCount, then assign it to another array, and return it from that array Not ever caching stuff further Follows up some ancient revisions --- includes/SiteStats.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/SiteStats.php b/includes/SiteStats.php index d66407b063..f0abd829ea 100644 --- a/includes/SiteStats.php +++ b/includes/SiteStats.php @@ -179,7 +179,7 @@ class SiteStats { wfProfileIn( __METHOD__ ); if( !isset( self::$pageCount[$ns] ) ) { $dbr = wfGetDB( DB_SLAVE ); - $pageCount[$ns] = (int)$dbr->selectField( + self::$pageCount[$ns] = (int)$dbr->selectField( 'page', 'COUNT(*)', array( 'page_namespace' => $ns ), @@ -187,7 +187,7 @@ class SiteStats { ); } wfProfileOut( __METHOD__ ); - return $pageCount[$ns]; + return self::$pageCount[$ns]; } /** -- 2.20.1