* Fixed check for sort order ('ZtoA' is not an allowed parameter)
authorTim Laqua <tlaqua@users.mediawiki.org>
Sun, 6 Jan 2008 05:43:57 +0000 (05:43 +0000)
committerTim Laqua <tlaqua@users.mediawiki.org>
Sun, 6 Jan 2008 05:43:57 +0000 (05:43 +0000)
includes/api/ApiQueryAllCategories.php
includes/api/ApiQueryAllpages.php

index 70224f3..e65ffe0 100644 (file)
@@ -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__);
index 0ede557..5ca0acc 100644 (file)
@@ -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__);