From: Roan Kattouw Date: Sat, 13 Sep 2008 18:10:23 +0000 (+0000) Subject: Reverting r40790 and fixing the filesort properly (by adding an extra ORDER BY clause). X-Git-Tag: 1.31.0-rc.0~45323 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=7237a1cecdd587aa8cbbd892c2756349211aeea5;p=lhc%2Fweb%2Fwiklou.git Reverting r40790 and fixing the filesort properly (by adding an extra ORDER BY clause). --- 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);