diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2022-10-27 22:57:27 +0200 |
---|---|---|
committer | Umherirrender <umherirrender_de.wp@web.de> | 2022-10-27 22:57:27 +0200 |
commit | 91d73bb221566bae574947aaaa875572686e2ec4 (patch) | |
tree | acde528627edfe8da8f59f05b6a1484ea2e83394 /includes/api/ApiQueryAllImages.php | |
parent | b3f6428d0f917873d68e94e0b3512f242c1279a0 (diff) | |
download | mediawikicore-91d73bb221566bae574947aaaa875572686e2ec4.tar.gz mediawikicore-91d73bb221566bae574947aaaa875572686e2ec4.zip |
api: Fix order by on list=allimages&aisort=timestamp for pagination
The order by on list=allimages&aisort=timestamp is only timestamp,
which is not unique, include the name to get unique pagination.
The continue parameter already working like that.
With d9534a5 the img_name was added to ORDER BY using addWhereRange,
but that is overridden by the explicit ORDER BY added later,
Remove the explicit ORDER BY to use the ORDER BY from
addTimestampWhereRange/addWhereRange
Change-Id: Id4783c37372847841ac86526df28aeed8b8eb0f7
Diffstat (limited to 'includes/api/ApiQueryAllImages.php')
-rw-r--r-- | includes/api/ApiQueryAllImages.php | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/includes/api/ApiQueryAllImages.php b/includes/api/ApiQueryAllImages.php index 14118e2f189b..1e4a87986217 100644 --- a/includes/api/ApiQueryAllImages.php +++ b/includes/api/ApiQueryAllImages.php @@ -281,15 +281,6 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase { $limit = $params['limit']; $this->addOption( 'LIMIT', $limit + 1 ); - $sortFlag = ''; - if ( !$ascendingOrder ) { - $sortFlag = ' DESC'; - } - if ( $params['sort'] == 'timestamp' ) { - $this->addOption( 'ORDER BY', 'img_timestamp' . $sortFlag ); - } else { - $this->addOption( 'ORDER BY', 'img_name' . $sortFlag ); - } $res = $this->select( __METHOD__ ); |