Only show pages in SpecialStatistics with page_counter > 0
authorJimmy Collins <collinj@users.mediawiki.org>
Tue, 11 Jul 2006 15:57:09 +0000 (15:57 +0000)
committerJimmy Collins <collinj@users.mediawiki.org>
Tue, 11 Jul 2006 15:57:09 +0000 (15:57 +0000)
includes/SpecialStatistics.php

index 42ba7a0..ffe58dc 100644 (file)
@@ -84,7 +84,7 @@ function wfSpecialStatistics() {
                
                global $wgDisableCounters, $wgUser, $wgLang;
                if( !$wgDisableCounters ) {
-                       $res = $dbr->query( "SELECT page_namespace, page_title, page_counter FROM {$page} WHERE page_is_redirect = 0 ORDER BY page_counter DESC LIMIT 0,10", __METHOD__ );
+                       $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>' );
                                $skin =& $wgUser->getSkin();