Index: trunk/extensions/SocialProfile/UserStats/TopUsers.php |
— | — | @@ -81,10 +81,16 @@ |
82 | 82 | // Build nav of stats by category based on MediaWiki:Topfans-by-category |
83 | 83 | $by_category_title = SpecialPage::getTitleFor( 'TopFansByStatistic' ); |
84 | 84 | |
85 | | - $lines = explode( "\n", wfMsgForContent( 'topfans-by-category' ) ); |
| 85 | + $byCategoryMessage = wfMsgForContent( 'topfans-by-category' ); |
| 86 | + $lines = explode( "\n", $byCategoryMessage ); |
86 | 87 | |
87 | | - if ( count( $lines ) > 0 ) { |
88 | | - $out .= '<h1 style="margin-top:15px !important;">' . wfMsg( 'top-fans-by-category-nav-header' ) . '</h1>'; |
| 88 | + if ( |
| 89 | + count( $lines ) > 0 && |
| 90 | + !wfEmptyMsg( 'topfans-by-category', $byCategoryMessage ) |
| 91 | + ) |
| 92 | + { |
| 93 | + $out .= '<h1 style="margin-top:15px !important;">' . |
| 94 | + wfMsg( 'top-fans-by-category-nav-header' ) . '</h1>'; |
89 | 95 | } |
90 | 96 | |
91 | 97 | foreach ( $lines as $line ) { |