Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php |
— | — | @@ -322,7 +322,8 @@ |
323 | 323 | } |
324 | 324 | |
325 | 325 | protected function appendUserGroups( $property, $numberInGroup ) { |
326 | | - global $wgGroupPermissions; |
| 326 | + global $wgGroupPermissions, $wgAddGroups, $wgRemoveGroups, $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf; |
| 327 | + |
327 | 328 | $data = array(); |
328 | 329 | foreach ( $wgGroupPermissions as $group => $permissions ) { |
329 | 330 | $arr = array( |
— | — | @@ -332,11 +333,25 @@ |
333 | 334 | if ( $numberInGroup ) { |
334 | 335 | $arr['number'] = SiteStats::numberInGroup( $group ); |
335 | 336 | } |
336 | | - |
| 337 | + |
| 338 | + $groupArr = array( |
| 339 | + 'add' => &$wgAddGroups, |
| 340 | + 'remove' => &$wgRemoveGroups, |
| 341 | + 'add-self' => &$wgGroupsAddToSelf, |
| 342 | + 'remove-self' => &$wgGroupsRemoveFromSelf |
| 343 | + ); |
| 344 | + |
| 345 | + foreach( $groupArr as $type => $rights ) { |
| 346 | + if( isset( $rights[$group] ) ) { |
| 347 | + $arr[$type] = $rights[$group]; |
| 348 | + $this->getResult()->setIndexedTagName( $arr[$type], 'group' ); |
| 349 | + } |
| 350 | + } |
| 351 | + |
337 | 352 | $this->getResult()->setIndexedTagName( $arr['rights'], 'permission' ); |
338 | 353 | $data[] = $arr; |
339 | 354 | } |
340 | | - |
| 355 | + |
341 | 356 | $this->getResult()->setIndexedTagName( $data, 'group' ); |
342 | 357 | return $this->getResult()->addValue( 'query', $property, $data ); |
343 | 358 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -330,6 +330,7 @@ |
331 | 331 | the timestamp of the last edit |
332 | 332 | * (bug 24677) axto= parameters added to allcategories, allimages, alllinks, allmessages, |
333 | 333 | allpages, and allusers |
| 334 | +* (bug 24236) Add add, remove, add-self, remove-self tags to meta=siteinfo&siprop=usergroups |
334 | 335 | |
335 | 336 | === Languages updated in 1.17 === |
336 | 337 | |