Reverting r40790 and fixing the filesort properly (by adding an extra ORDER BY clause).
authorRoan Kattouw <catrope@users.mediawiki.org>
Sat, 13 Sep 2008 18:10:23 +0000 (18:10 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sat, 13 Sep 2008 18:10:23 +0000 (18:10 +0000)
includes/api/ApiQueryDeletedrevs.php

index fcb80d5..8a0c85b 100644 (file)
@@ -107,8 +107,11 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        $lb = new LinkBatch($titles);
                        $where = $lb->constructSet('ar', $db);
                        $this->addWhere($where);
-               } else {
-                       $this->dieUsage('You have to specify a page title or titles');
+               }
+               else
+               {
+                       $dir = ($params['dir'] == 'older' ? 'DESC' : '');
+                       $this->addOption('ORDER BY', "ar_namespace $dir, ar_title $dir");
                }
 
                $this->addOption('LIMIT', $limit + 1);