r23741 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23740‎ | r23741 | r23742 >
Date:15:09, 5 July 2007
Author:catrope
Status:old
Tags:
Comment:
API: Adding ucnamespace parameter to list=usercontribs
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryUserContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryUserContributions.php
@@ -135,6 +135,9 @@
136136 $this->addWhereRange('rev_timestamp',
137137 $this->params['dir'], $this->params['start'], $this->params['end'] );
138138
 139+ if(count($this->params['namespace']) > 0)
 140+ $this->addWhereFld('page_namespace', $this->params['namespace']);
 141+
139142 $show = $this->params['show'];
140143 if (!is_null($show)) {
141144 $show = array_flip($show);
@@ -226,6 +229,10 @@
227230 'older'
228231 )
229232 ),
 233+ 'namespace' => array (
 234+ ApiBase :: PARAM_ISMULTI => true,
 235+ ApiBase :: PARAM_TYPE => 'namespace'
 236+ ),
230237 'prop' => array (
231238 ApiBase :: PARAM_ISMULTI => true,
232239 ApiBase :: PARAM_DFLT => 'ids|title|timestamp|flags|comment',
@@ -254,13 +261,14 @@
255262 'end' => 'The end timestamp to return to.',
256263 'user' => 'The user to retrieve contributions for.',
257264 'dir' => 'The direction to search (older or newer).',
 265+ 'namespace' => 'Only list contributions in these namespaces',
258266 'prop' => 'Include additional pieces of information',
259267 'show' => 'Show only items that meet this criteria, e.g. non minor edits only: show=!minor',
260268 );
261269 }
262270
263271 protected function getDescription() {
264 - return 'Get edits by a user..';
 272+ return 'Get all edits by a user';
265273 }
266274
267275 protected function getExamples() {

Follow-up revisions

RevisionCommit summaryAuthorDate
r23912Merged revisions 23662-23909 via svnmerge from...david18:11, 9 July 2007

Status & tagging log