r84361 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84360‎ | r84361 | r84362 >
Date:00:19, 20 March 2011
Author:reedy
Status:resolved
Tags:
Comment:
* (bug 27469) label implicit groups in list=allusers&auprop=groups/list=users&usprop=groups
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUsers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryUsers.php
@@ -245,18 +245,26 @@
246246 }
247247
248248 /**
249 - * Gets all the groups that a user is automatically a member of
 249+ * Gets all the groups that a user is automatically a member of (implicit groups)
250250 * @param $user User
251251 * @return array
252252 */
253253 public static function getAutoGroups( $user ) {
254 - $groups = array( '*' );
 254+ $groups = array();
 255+ $groups[] = '*';
255256
256257 if ( !$user->isAnon() ) {
257258 $groups[] = 'user';
258259 }
259260
260 - return array_merge( $groups, Autopromote::getAutopromoteGroups( $user ) );
 261+ $builtGroups = array();
 262+ $i = 0;
 263+ foreach( array_merge( $groups, Autopromote::getAutopromoteGroups( $user ) ) as $g ) {
 264+ $builtGroups[$i] = array( 'implicit' => '' );
 265+ ApiResult::setContent( $builtGroups[$i], $g );
 266+ $i++;
 267+ }
 268+ return $builtGroups;
261269 }
262270
263271 public function getCacheMode( $params ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -269,6 +269,8 @@
270270 * (bug 28104) Namespace for local pages in interwiki backlinks (iwbacklinks)
271271 is missing
272272 * (bug 27343) Add parseddescription to list=filearchive
 273+* (bug 27469) label implicit groups in list=allusers&auprop=groups/
 274+ list=users&usprop=groups
273275
274276 === Languages updated in 1.18 ===
275277

Follow-up revisions

RevisionCommit summaryAuthorDate
r84364Followup r84361, numerical keys ftwreedy00:32, 20 March 2011

Status & tagging log