From: Roan Kattouw Date: Sun, 16 Mar 2008 19:08:30 +0000 (+0000) Subject: API: X-Git-Tag: 1.31.0-rc.0~49067 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=471006c9cbba5b886b4d12057d113e1bad1c9f15;p=lhc%2Fweb%2Fwiklou.git API: * Removing deprecated cmcategory parameter * Correcting action=login help text --- diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index d124556f94..271286cf4d 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -241,7 +241,7 @@ class ApiLogin extends ApiBase { 'This module is used to login and get the authentication tokens. ', 'In the event of a successful log-in, a cookie will be attached', 'to your session. In the event of a failed log-in, you will not ', - 'be able to attempt another log-in through this method for 60 seconds.', + 'be able to attempt another log-in through this method for 5 seconds.', 'This is to prevent password guessing by automated password crackers.' ); } diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php index 61c433e4eb..0286167c88 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -51,15 +51,9 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { $params = $this->extractRequestParams(); - if (is_null($params['category'])) { - if (is_null($params['title'])) - $this->dieUsage("Either the cmcategory or the cmtitle parameter is required", 'notitle'); - else - $categoryTitle = Title::newFromText($params['title']); - } else if(is_null($params['title'])) - $categoryTitle = Title::makeTitleSafe(NS_CATEGORY, $params['category']); - else - $this->dieUsage("The cmcategory and cmtitle parameters can't be used together", 'titleandcategory'); + if (is_null($params['category'])) + $this->dieUsage("The cmtitle parameter is required", 'notitle'); + $categoryTitle = Title::makeTitleSafe(NS_CATEGORY, $params['category']); if ( is_null( $categoryTitle ) || $categoryTitle->getNamespace() != NS_CATEGORY ) $this->dieUsage("The category name you entered is not valid", 'invalidcategory'); @@ -182,7 +176,6 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { public function getAllowedParams() { return array ( 'title' => null, - 'category' => null, // DEPRECATED, will be removed in early March 'prop' => array ( ApiBase :: PARAM_DFLT => 'ids|title', ApiBase :: PARAM_ISMULTI => true, @@ -239,7 +232,6 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { 'end' => 'Timestamp to end listing at', 'continue' => 'For large categories, give the value retured from previous query', 'limit' => 'The maximum number of pages to return.', - 'category' => 'DEPRECATED. Like title, but without the Category: prefix.', ); }