From 7237a1cecdd587aa8cbbd892c2756349211aeea5 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 13 Sep 2008 18:10:23 +0000 Subject: [PATCH] Reverting r40790 and fixing the filesort properly (by adding an extra ORDER BY clause). --- includes/api/ApiQueryDeletedrevs.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index fcb80d52df..8a0c85b128 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -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); -- 2.20.1