From 20308a5abcf8ea3f1b69f3ece125def10163ab8f Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Sun, 13 Apr 2008 19:17:48 +0000 Subject: [PATCH] (bug 13718) Return the proper continue parameter for cmsort=timestamp --- RELEASE-NOTES | 1 + includes/api/ApiQueryCategoryMembers.php | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2a53a28886..28546b49a8 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -224,6 +224,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 11673) Return error 'unknown_action' in specified format * (bug 13618) Added rcprop=redirect and rcshow=redirect to list=recentchanges * (bug 13544) Added oldid parameter to action=parse to allow for parsing of old revisions +* (bug 13718) Return the proper continue parameter for cmsort=timestamp === Languages updated in 1.13 === diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php index aba1aa7851..b17efeb310 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -72,7 +72,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { $this->addFields(array('cl_from', 'cl_sortkey')); } - $this->addFieldsIf('cl_timestamp', $fld_timestamp); + $this->addFieldsIf('cl_timestamp', $fld_timestamp || $params['sort'] == 'timestamp'); $this->addTables(array('page','categorylinks')); // must be in this order for 'USE INDEX' // Not needed after bug 10280 is applied to servers if($params['sort'] == 'timestamp') @@ -105,7 +105,10 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { if (++ $count > $limit) { // We've reached the one extra which shows that there are additional pages to be had. Stop here... // TODO: Security issue - if the user has no right to view next title, it will still be shown - $this->setContinueEnumParameter('continue', $this->getContinueStr($row, $lastSortKey)); + if ($params['sort'] == 'timestamp') + $this->setContinueEnumParameter('start', $row->cl_timestamp); + else + $this->setContinueEnumParameter('continue', $this->getContinueStr($row, $lastSortKey)); break; } -- 2.20.1