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();