Index: trunk/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -135,6 +135,9 @@ |
136 | 136 | $this->addWhereRange('rev_timestamp', |
137 | 137 | $this->params['dir'], $this->params['start'], $this->params['end'] ); |
138 | 138 | |
| 139 | + if(count($this->params['namespace']) > 0) |
| 140 | + $this->addWhereFld('page_namespace', $this->params['namespace']); |
| 141 | + |
139 | 142 | $show = $this->params['show']; |
140 | 143 | if (!is_null($show)) { |
141 | 144 | $show = array_flip($show); |
— | — | @@ -226,6 +229,10 @@ |
227 | 230 | 'older' |
228 | 231 | ) |
229 | 232 | ), |
| 233 | + 'namespace' => array ( |
| 234 | + ApiBase :: PARAM_ISMULTI => true, |
| 235 | + ApiBase :: PARAM_TYPE => 'namespace' |
| 236 | + ), |
230 | 237 | 'prop' => array ( |
231 | 238 | ApiBase :: PARAM_ISMULTI => true, |
232 | 239 | ApiBase :: PARAM_DFLT => 'ids|title|timestamp|flags|comment', |
— | — | @@ -254,13 +261,14 @@ |
255 | 262 | 'end' => 'The end timestamp to return to.', |
256 | 263 | 'user' => 'The user to retrieve contributions for.', |
257 | 264 | 'dir' => 'The direction to search (older or newer).', |
| 265 | + 'namespace' => 'Only list contributions in these namespaces', |
258 | 266 | 'prop' => 'Include additional pieces of information', |
259 | 267 | 'show' => 'Show only items that meet this criteria, e.g. non minor edits only: show=!minor', |
260 | 268 | ); |
261 | 269 | } |
262 | 270 | |
263 | 271 | protected function getDescription() { |
264 | | - return 'Get edits by a user..'; |
| 272 | + return 'Get all edits by a user'; |
265 | 273 | } |
266 | 274 | |
267 | 275 | protected function getExamples() { |