Suppress when miser mode is on; it's expensive
authorRob Church <robchurch@users.mediawiki.org>
Tue, 11 Jul 2006 16:33:04 +0000 (16:33 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Tue, 11 Jul 2006 16:33:04 +0000 (16:33 +0000)
includes/SpecialStatistics.php

index ffe58dc..dda82a8 100644 (file)
@@ -82,8 +82,8 @@ function wfSpecialStatistics() {
 
                $wgOut->addWikiText( $text );
                
-               global $wgDisableCounters, $wgUser, $wgLang;
-               if( !$wgDisableCounters ) {
+               global $wgDisableCounters, $wgMiserMode, $wgUser, $wgLang;
+               if( !$wgDisableCounters && !$wgMiserMode ) {
                        $res = $dbr->query( "SELECT page_namespace, page_title, page_counter FROM {$page} WHERE page_is_redirect = 0 AND page_counter > 0 ORDER BY page_counter DESC LIMIT 0,10", __METHOD__ );
                        if( $res ) {
                                $wgOut->addHtml( '<h2>' . wfMsgHtml( 'statistics-mostpopular' ) . '</h2>' );