From 1885b601f84ac8ec4acf157f653b4779d7e936c4 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Sat, 19 May 2007 04:26:08 +0000 Subject: [PATCH] API: fixed bug 9927: usercontribs query does not accept IP address --- includes/api/ApiQueryUserContributions.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index 8fce76c10a..e92869845e 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -52,11 +52,6 @@ class ApiQueryContributions extends ApiQueryBase { if (is_null($user)) $this->dieUsage("User parameter may not be empty", 'param_user'); - $userid = $db->selectField('user', 'user_id', array ( - 'user_name' => $user - )); - if (!$userid) - $this->dieUsage("User name $user not found", 'param_user'); //Get the table names list ($tbl_page, $tbl_revision) = $db->tableNamesN('page', 'revision'); @@ -141,7 +136,9 @@ class ApiQueryContributions extends ApiQueryBase { 'end' => array ( ApiBase :: PARAM_TYPE => 'timestamp' ), - 'user' => null, + 'user' => array ( + ApiBase :: PARAM_TYPE => 'user' + ), 'dir' => array ( ApiBase :: PARAM_DFLT => 'older', ApiBase :: PARAM_TYPE => array ( -- 2.20.1