From af6a3bc49e46ef9b3cf53fc53faf85aa76ceacc6 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Fri, 1 Jun 2012 23:46:40 +0200 Subject: [PATCH] (bug 35980) drcontinue should pay attention to drdir in "all" mode In "all" mode (mode #3 in the module's documentation), the drdir parameter is treated by the result ordering as if it were always drdir=newer; drcontinue, on the other hand, always tries to honor drdir correctly, leading to the drcontinue not actually working unless drdir is specifically given. This fixes that. Change-Id: Icf6982d0ba55490b7a7ae3a1ee6c94c40f1c3c64 --- RELEASE-NOTES-1.20 | 1 + includes/api/ApiQueryDeletedrevs.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index ec5009637f..423e44f3ed 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -183,6 +183,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki. * (bug 32383) Allow descending order for list=langbacklinks * API meta=siteinfo can now return the list of known variable IDs * (bug 30836) siteinfo prop=specialpagealiases will no longer return nonexistent special pages +* (bug 35980) list=deletedrevs now honors drdir correctly in "all" mode (mode #3) === Languages updated in 1.20 === diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index 06f649dd91..df5e303a3f 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -180,9 +180,10 @@ class ApiQueryDeletedrevs extends ApiQueryBase { if ( $params['unique'] ) { $this->addOption( 'GROUP BY', 'ar_title' ); } else { + $sort = ( $dir == 'newer' ? '' : ' DESC' ); $this->addOption( 'ORDER BY', array( - 'ar_title', - 'ar_timestamp' + 'ar_title' . $sort, + 'ar_timestamp' . $sort )); } } else { -- 2.20.1