From: Chad Horohoe Date: Tue, 5 Aug 2008 14:35:39 +0000 (+0000) Subject: This can use User::getGroupsWithPermission() as well. X-Git-Tag: 1.31.0-rc.0~46118 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=88d01be1890b3e035f92cbe24ddc2bfb8126b854;p=lhc%2Fweb%2Fwiklou.git This can use User::getGroupsWithPermission() as well. --- diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index e57f6fc1eb..2d83d7c2d6 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -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 */