http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88837

Revision: 88837
Author:   reedy
Date:     2011-05-25 20:57:15 +0000 (Wed, 25 May 2011)
Log Message:
-----------
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

Modified Paths:
--------------
    trunk/phase3/includes/SiteStats.php

Modified: trunk/phase3/includes/SiteStats.php
===================================================================
--- trunk/phase3/includes/SiteStats.php 2011-05-25 20:44:09 UTC (rev 88836)
+++ trunk/phase3/includes/SiteStats.php 2011-05-25 20:57:15 UTC (rev 88837)
@@ -179,7 +179,7 @@
                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 @@
                        );
                }
                wfProfileOut( __METHOD__ );
-               return $pageCount[$ns];
+               return self::$pageCount[$ns];
        }
 
        /**


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to