We check self::$pageCount, then assign it to another array, and return it from that...
authorSam Reed <reedy@users.mediawiki.org>
Wed, 25 May 2011 20:57:15 +0000 (20:57 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 25 May 2011 20:57:15 +0000 (20:57 +0000)
Not ever caching stuff further

Follows up some ancient revisions

includes/SiteStats.php

index d66407b..f0abd82 100644 (file)
@@ -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];
        }
 
        /**