From: Victor Vasiliev Date: Tue, 18 Mar 2008 08:14:08 +0000 (+0000) Subject: * Use "title" instead of "category" X-Git-Tag: 1.31.0-rc.0~49030 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=702839e0607b62866faff1b9f1aaa33524cb5c2f;p=lhc%2Fweb%2Fwiklou.git * Use "title" instead of "category" * Support both "Category:Test" and "Test" format * Fix notice about undefined index --- diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php index 0286167c88..cb2a1d68be 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -51,9 +51,9 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { $params = $this->extractRequestParams(); - if (is_null($params['category'])) + if ( !isset($params['title']) || is_null($params['title']) ) $this->dieUsage("The cmtitle parameter is required", 'notitle'); - $categoryTitle = Title::makeTitleSafe(NS_CATEGORY, $params['category']); + $categoryTitle = Title::newFromText($params['title'], NS_CATEGORY); if ( is_null( $categoryTitle ) || $categoryTitle->getNamespace() != NS_CATEGORY ) $this->dieUsage("The category name you entered is not valid", 'invalidcategory');