Index: trunk/phase3/includes/api/ApiQueryUserInfo.php |
— | — | @@ -70,13 +70,8 @@ |
71 | 71 | $vals['rights'] = $wgUser->getRights(); |
72 | 72 | $result->setIndexedTagName($vals['rights'], 'r'); // even if empty |
73 | 73 | } |
74 | | - } |
75 | | - |
76 | | - if (!empty($params['option'])) { |
77 | | - foreach( $params['option'] as $option ) { |
78 | | - if (empty($option)) |
79 | | - $this->dieUsage('Empty value is not allowed for the option parameter', 'option'); |
80 | | - $vals['options'][$option] = $wgUser->getOption($option); |
| 74 | + if (isset($prop['options'])) { |
| 75 | + $vals['options'] = (is_null($wgUser->mOptions) ? User::getDefaultOptions() : $wgUser->mOptions); |
81 | 76 | } |
82 | 77 | } |
83 | 78 | |
— | — | @@ -93,11 +88,8 @@ |
94 | 89 | 'hasmsg', |
95 | 90 | 'groups', |
96 | 91 | 'rights', |
97 | | - )), |
98 | | - 'option' => array ( |
99 | | - ApiBase :: PARAM_DFLT => NULL, |
100 | | - ApiBase :: PARAM_ISMULTI => true, |
101 | | - ), |
| 92 | + 'options' |
| 93 | + )) |
102 | 94 | ); |
103 | 95 | } |
104 | 96 | |
— | — | @@ -109,8 +101,8 @@ |
110 | 102 | ' hasmsg - adds a tag "message" if user has pending messages', |
111 | 103 | ' groups - lists all the groups the current user belongs to', |
112 | 104 | ' rights - lists of all rights the current user has', |
113 | | - ), |
114 | | - 'option' => 'A list of user preference options to get', |
| 105 | + ' options - lists all preferences the current user has set' |
| 106 | + ) |
115 | 107 | ); |
116 | 108 | } |
117 | 109 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -158,6 +158,7 @@ |
159 | 159 | * (bug 11562) Added a user_registration parameter/field to the list=allusers query. |
160 | 160 | * (bug 11588) Preserve document structure for empty dataset in backlinks query. |
161 | 161 | * Allow staying logged in through lg* parameters instead of cookies |
| 162 | +* Outputting list of all user preferences rather than having to request them by name |
162 | 163 | |
163 | 164 | === Languages updated in 1.12 === |
164 | 165 | |