Followup to r68157: simplify ApiQueryUsers::getAutoGroups()
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 17 Jun 2010 09:39:07 +0000 (09:39 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 17 Jun 2010 09:39:07 +0000 (09:39 +0000)
includes/api/ApiQueryUsers.php

index 82cdcca..46aba7f 100644 (file)
@@ -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() {