API:
authorRoan Kattouw <catrope@users.mediawiki.org>
Sun, 16 Mar 2008 19:08:30 +0000 (19:08 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sun, 16 Mar 2008 19:08:30 +0000 (19:08 +0000)
* Removing deprecated cmcategory parameter
* Correcting action=login help text

includes/api/ApiLogin.php
includes/api/ApiQueryCategoryMembers.php

index d124556..271286c 100644 (file)
@@ -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.'
                );
        }
index 61c433e..0286167 100644 (file)
@@ -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.',
                );
        }