From 8961c4c4d0cdbbede05fada5b9889cce4c370cbd Mon Sep 17 00:00:00 2001 From: Tim Laqua Date: Sun, 6 Jan 2008 05:43:57 +0000 Subject: [PATCH] * Fixed check for sort order ('ZtoA' is not an allowed parameter) --- includes/api/ApiQueryAllCategories.php | 2 +- includes/api/ApiQueryAllpages.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiQueryAllCategories.php b/includes/api/ApiQueryAllCategories.php index 70224f3ddf..e65ffe0e7b 100644 --- a/includes/api/ApiQueryAllCategories.php +++ b/includes/api/ApiQueryAllCategories.php @@ -62,7 +62,7 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase { $this->addWhere("cl_to LIKE '" . $db->escapeLike(ApiQueryBase :: titleToKey($params['prefix'])) . "%'"); $this->addOption('LIMIT', $params['limit']+1); - $this->addOption('ORDER BY', 'cl_to' . ($params['dir'] == 'ZtoA' ? ' DESC' : '')); + $this->addOption('ORDER BY', 'cl_to' . ($params['dir'] == 'descending' ? ' DESC' : '')); $this->addOption('DISTINCT'); $res = $this->select(__METHOD__); diff --git a/includes/api/ApiQueryAllpages.php b/includes/api/ApiQueryAllpages.php index 0ede557ec5..5ca0acc5c1 100644 --- a/includes/api/ApiQueryAllpages.php +++ b/includes/api/ApiQueryAllpages.php @@ -113,7 +113,7 @@ class ApiQueryAllpages extends ApiQueryGeneratorBase { $limit = $params['limit']; $this->addOption('LIMIT', $limit+1); $this->addOption('ORDER BY', 'page_namespace, page_title' . - ($params['dir'] == 'ZtoA' ? ' DESC' : '')); + ($params['dir'] == 'descending' ? ' DESC' : '')); $res = $this->select(__METHOD__); -- 2.20.1