(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
This commit is contained in:
Brad Jorsch 2012-06-01 23:46:40 +02:00
parent 4216ae2640
commit af6a3bc49e
2 changed files with 4 additions and 2 deletions

View file

@ -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 ===

View file

@ -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 {