From a1db76daaf905df9959704ea4bad8a41decab237 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 17 Jun 2010 09:39:07 +0000 Subject: [PATCH] Followup to r68157: simplify ApiQueryUsers::getAutoGroups() --- includes/api/ApiQueryUsers.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index 82cdccae62..46aba7f59e 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -225,15 +225,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { * @return array */ public static function getAutoGroups( $user ) { - $autolist = array(); - $autolist[] = "*"; - $autolist[] = "user"; - - foreach( Autopromote::getAutopromoteGroups( $user ) as $group ) { - $autolist[] = $group; - } - - return $autolist; + return array_merge( array( '*', 'user' ), Autopromote::getAutopromoteGroups( $user ) ); } public function getAllowedParams() { -- 2.20.1