r48873 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48872‎ | r48873 | r48874 >
Date:13:10, 26 March 2009
Author:catrope
Status:ok
Tags:
Comment:
API: Added uiprop=changeablegroups to meta=userinfo
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUserInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryUserInfo.php
@@ -80,6 +80,13 @@
8181 $vals['rights'] = array_values(array_unique($wgUser->getRights()));
8282 $result->setIndexedTagName($vals['rights'], 'r'); // even if empty
8383 }
 84+ if (isset($this->prop['changeablegroups'])) {
 85+ $vals['changeablegroups'] = $wgUser->changeableGroups();
 86+ $result->setIndexedTagName($vals['changeablegroups']['add'], 'g');
 87+ $result->setIndexedTagName($vals['changeablegroups']['remove'], 'g');
 88+ $result->setIndexedTagName($vals['changeablegroups']['add-self'], 'g');
 89+ $result->setIndexedTagName($vals['changeablegroups']['remove-self'], 'g');
 90+ }
8491 if (isset($this->prop['options'])) {
8592 $vals['options'] = (is_null($wgUser->mOptions) ? User::getDefaultOptions() : $wgUser->mOptions);
8693 }
@@ -144,6 +151,7 @@
145152 'hasmsg',
146153 'groups',
147154 'rights',
 155+ 'changeablegroups',
148156 'options',
149157 'preferencestoken',
150158 'editcount',
@@ -161,7 +169,8 @@
162170 ' blockinfo - tags if the current user is blocked, by whom, and for what reason',
163171 ' hasmsg - adds a tag "message" if the current user has pending messages',
164172 ' groups - lists all the groups the current user belongs to',
165 - ' rights - lists of all rights the current user has',
 173+ ' rights - lists all the rights the current user has',
 174+ ' changeablegroups - lists the groups the current user can add to and remove from',
166175 ' options - lists all preferences the current user has set',
167176 ' editcount - adds the current user\'s edit count',
168177 ' ratelimits - lists all rate limits applying to the current user'
Index: trunk/phase3/RELEASE-NOTES
@@ -342,6 +342,7 @@
343343 * (bug 15935) Added action=userrights to add/remove users to/from groups
344344 * (bug 18099) Using appendtext to edit a non-existent page causes an interface
345345 message to be included in the page text
 346+* Added uiprop=changeablegroups to meta=userinfo
346347
347348 === Languages updated in 1.15 ===
348349

Status & tagging log