This can use User::getGroupsWithPermission() as well.
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 5 Aug 2008 14:35:39 +0000 (14:35 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 5 Aug 2008 14:35:39 +0000 (14:35 +0000)
includes/specials/SpecialNewimages.php

index e57f6fc..2d83d7c 100644 (file)
@@ -24,10 +24,8 @@ function wfSpecialNewimages( $par, $specialPage ) {
                    set.
                */
                $botconds=array();
-               foreach ($wgGroupPermissions as $groupname=>$perms) {
-                       if(array_key_exists('bot',$perms) && $perms['bot']) {
-                               $botconds[]="ug_group='$groupname'";
-                       }
+               foreach ( User::getGroupsWithPermission('bot') as $groupname ) {
+                       $botconds[]="ug_group='$groupname'";
                }
 
                /* If not bot groups, do not set $hidebotsql */