r88837 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88836‎ | r88837 | r88838 >
Date:20:57, 25 May 2011
Author:reedy
Status:ok
Tags:
Comment:
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) (history)

Diff [purge]

Index: trunk/phase3/includes/SiteStats.php
@@ -179,7 +179,7 @@
180180 wfProfileIn( __METHOD__ );
181181 if( !isset( self::$pageCount[$ns] ) ) {
182182 $dbr = wfGetDB( DB_SLAVE );
183 - $pageCount[$ns] = (int)$dbr->selectField(
 183+ self::$pageCount[$ns] = (int)$dbr->selectField(
184184 'page',
185185 'COUNT(*)',
186186 array( 'page_namespace' => $ns ),
@@ -187,7 +187,7 @@
188188 );
189189 }
190190 wfProfileOut( __METHOD__ );
191 - return $pageCount[$ns];
 191+ return self::$pageCount[$ns];
192192 }
193193
194194 /**

Status & tagging log