Revision: 43612
Author: raymond
Date: 2008-11-17 17:38:30 +0000 (Mon, 17 Nov 2008)
Log Message:
-----------
Add a class when a usergroup contains no members to allow hiding these rows per
Commons.css or user specific CSS. Per suggestion of Purodha.
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialStatistics.php
Modified: trunk/phase3/includes/specials/SpecialStatistics.php
===================================================================
--- trunk/phase3/includes/specials/SpecialStatistics.php 2008-11-17
17:28:35 UTC (rev 43611)
+++ trunk/phase3/includes/specials/SpecialStatistics.php 2008-11-17
17:38:30 UTC (rev 43612)
@@ -117,9 +117,16 @@
array(),
array( 'group' => $group ),
'known' );
+
+ # Add a class when a usergroup contains no members to
allow hiding these rows
+ $classZero = '';
+ $countUsers = SiteStats::numberingroup( $groupname );
+ if( $countUsers == 0 ) {
+ $classZero = ' statistics-group-zero';
+ }
$text .= formatRow( $grouppage . ' ' . $grouplink,
- $wgLang->formatNum( SiteStats::numberingroup(
$groupname ) ),
- ' class="statistics-group-' .
Sanitizer::escapeClass( $group ) . '"' );
+ $wgLang->formatNum( $countUsers ),
+ ' class="statistics-group-' .
Sanitizer::escapeClass( $group ) . $classZero . '"' );
}
}
$text .= $viewsStats;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs