r59952 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59951‎ | r59952 | r59953 >
Date:15:44, 11 December 2009
Author:catrope
Status:ok
Tags:
Comment:
wmf-deployment: Commit live hack for bug 21817 (API list=usercontribs chokes on empty &ucuser=). Patch by Paul Copperman, live hack applied by Domas
Modified paths:
  • /branches/wmf-deployment/includes/api/ApiQueryUserContributions.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/includes/api/ApiQueryUserContributions.php
@@ -45,7 +45,6 @@
4646 $fld_patrolled = false;
4747
4848 public function execute() {
49 -
5049 // Parse some parameters
5150 $this->params = $this->extractRequestParams();
5251
@@ -73,6 +72,8 @@
7473 $this->usernames = array();
7574 if(!is_array($this->params['user']))
7675 $this->params['user'] = array($this->params['user']);
 76+ if(!count($this->params['user']))
 77+ $this->dieUsage('User parameter may not be empty.', 'param_user');
7778 foreach($this->params['user'] as $u)
7879 $this->prepareUsername($u);
7980 $this->prefixMode = false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r59953API: (bug 21817) list=usercontribs chokes on empty ucuser. Patch by Paul Copp...catrope15:47, 11 December 2009

Status & tagging log