reimplement r73652 having actually read coding conventions this time
authorMatthew Britton <gurch@users.mediawiki.org>
Fri, 24 Sep 2010 14:40:18 +0000 (14:40 +0000)
committerMatthew Britton <gurch@users.mediawiki.org>
Fri, 24 Sep 2010 14:40:18 +0000 (14:40 +0000)
includes/api/ApiQuerySiteinfo.php

index 61a2b7b..e4c4c07 100644 (file)
@@ -335,11 +335,11 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                        if ( $numberInGroup ) {
                                global $wgAutopromote;
                        
-                               if ($group == 'user') {
+                               if ( $group == 'user' ) {
                                        $arr['number'] = SiteStats::users();
                                        
                                // '*' and autopromote groups have no size
-                               } elseif (!($group == '*' || in_array($group, array_keys($wgAutopromote)))) {
+                               } elseif ( $group !== '*' && !isset( $wgAutopromote[$group] ) ) {
                                        $arr['number'] = SiteStats::numberInGroup( $group );
                                }
                        }