(bug 13718) Return the proper continue parameter for cmsort=timestamp
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 13 Apr 2008 19:17:48 +0000 (19:17 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 13 Apr 2008 19:17:48 +0000 (19:17 +0000)
RELEASE-NOTES
includes/api/ApiQueryCategoryMembers.php

index 2a53a28..28546b4 100644 (file)
@@ -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 ===
 
index aba1aa7..b17efeb 100644 (file)
@@ -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;
                        }