Index: trunk/phase3/includes/api/ApiQueryUsers.php |
— | — | @@ -145,6 +145,8 @@ |
146 | 146 | } |
147 | 147 | if(isset($this->prop['emailable']) && $user->canReceiveEmail()) |
148 | 148 | $data[$name]['emailable'] = ''; |
| 149 | + if(isset($this->prop['gender'])) |
| 150 | + $data[$name]['gender'] = $user->getOption( 'gender' ); |
149 | 151 | if(!is_null($params['token'])) |
150 | 152 | { |
151 | 153 | $tokenFunctions = $this->getTokenFunctions(); |
— | — | @@ -191,6 +193,7 @@ |
192 | 194 | 'editcount', |
193 | 195 | 'registration', |
194 | 196 | 'emailable', |
| 197 | + 'gender', |
195 | 198 | ) |
196 | 199 | ), |
197 | 200 | 'users' => array( |
— | — | @@ -212,6 +215,7 @@ |
213 | 216 | ' editcount - adds the user\'s edit count', |
214 | 217 | ' registration - adds the user\'s registration timestamp', |
215 | 218 | ' emailable - tags if the user can and wants to receive e-mail through [[Special:Emailuser]]', |
| 219 | + ' gender - tags the gender of the user. Returns "male", "female", or "unknown"', |
216 | 220 | ), |
217 | 221 | 'users' => 'A list of users to obtain the same information for', |
218 | 222 | 'token' => 'Which tokens to obtain for each user', |
— | — | @@ -223,7 +227,7 @@ |
224 | 228 | } |
225 | 229 | |
226 | 230 | protected function getExamples() { |
227 | | - return 'api.php?action=query&list=users&ususers=brion|TimStarling&usprop=groups|editcount'; |
| 231 | + return 'api.php?action=query&list=users&ususers=brion|TimStarling&usprop=groups|editcount|gender'; |
228 | 232 | } |
229 | 233 | |
230 | 234 | public function getVersion() { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -364,6 +364,7 @@ |
365 | 365 | * (bug 18099) Using appendtext to edit a non-existent page causes an interface |
366 | 366 | message to be included in the page text |
367 | 367 | * Added uiprop=changeablegroups to meta=userinfo |
| 368 | +* Added usprop=gender to list=users |
368 | 369 | |
369 | 370 | === Languages updated in 1.15 === |
370 | 371 | |