Index: trunk/phase3/includes/specials/SpecialStatistics.php |
— | — | @@ -117,9 +117,16 @@ |
118 | 118 | array(), |
119 | 119 | array( 'group' => $group ), |
120 | 120 | 'known' ); |
| 121 | + |
| 122 | + # Add a class when a usergroup contains no members to allow hiding these rows |
| 123 | + $classZero = ''; |
| 124 | + $countUsers = SiteStats::numberingroup( $groupname ); |
| 125 | + if( $countUsers == 0 ) { |
| 126 | + $classZero = ' statistics-group-zero'; |
| 127 | + } |
121 | 128 | $text .= formatRow( $grouppage . ' ' . $grouplink, |
122 | | - $wgLang->formatNum( SiteStats::numberingroup( $groupname ) ), |
123 | | - ' class="statistics-group-' . Sanitizer::escapeClass( $group ) . '"' ); |
| 129 | + $wgLang->formatNum( $countUsers ), |
| 130 | + ' class="statistics-group-' . Sanitizer::escapeClass( $group ) . $classZero . '"' ); |
124 | 131 | } |
125 | 132 | } |
126 | 133 | $text .= $viewsStats; |