From: Brad Jorsch Date: Fri, 1 Jun 2012 21:46:40 +0000 (+0200) Subject: (bug 35980) drcontinue should pay attention to drdir in "all" mode X-Git-Tag: 1.31.0-rc.0~23111 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22lang_raccourcis%22%2C%22module=%24nom_module%22%29%20.%20%22?a=commitdiff_plain;h=af6a3bc49e46ef9b3cf53fc53faf85aa76ceacc6;p=lhc%2Fweb%2Fwiklou.git (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 --- 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 {