From d3eec98cb79fbee8193e8c61b38e98d45a755325 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Mon, 4 Apr 2011 20:51:41 +0000 Subject: [PATCH] Set forgotten api parameters types * (bug 28394) Set forgotten parameters types in ApiUnblock * (bug 28395) Set forgotten parameters types in ApiParse --- RELEASE-NOTES | 2 ++ includes/api/ApiParse.php | 8 ++++++-- includes/api/ApiUnblock.php | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 237f9545e6..2b0dbdf944 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -217,6 +217,8 @@ PHP if you have not done so prior to upgrading MediaWiki. * (bug 27893) Edit-on-doubleclick now applies only on view and purge actions; no longer triggers unexpectedly on delete, history etc. * (bug 28417) Fix PHP notice when importing revision without a listed id +* (bug 28394) Set forgotten parameters types in ApiUnblock +* (bug 28395) Set forgotten parameters types in ApiParse === API changes in 1.18 === * (bug 26339) Throw warning when truncating an overlarge API result diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 714a8ebba7..5faf8f5ede 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -483,9 +483,13 @@ class ApiParse extends ApiBase { 'text' => null, 'summary' => null, 'page' => null, - 'pageid' => null, + 'pageid' => array( + ApiBase::PARAM_TYPE => 'integer', + ), 'redirects' => false, - 'oldid' => null, + 'oldid' => array( + ApiBase::PARAM_TYPE => 'integer', + ), 'prop' => array( ApiBase::PARAM_DFLT => 'text|langlinks|categories|links|templates|images|externallinks|sections|revid|displaytitle', ApiBase::PARAM_ISMULTI => true, diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php index d10ca8f07d..bdafe135c5 100644 --- a/includes/api/ApiUnblock.php +++ b/includes/api/ApiUnblock.php @@ -98,7 +98,9 @@ class ApiUnblock extends ApiBase { public function getAllowedParams() { return array( - 'id' => null, + 'id' => array( + ApiBase::PARAM_TYPE => 'integer', + ), 'user' => null, 'token' => null, 'gettoken' => false, -- 2.20.1