r33256 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r33255‎ | r33256 | r33257 >
Date:19:17, 13 April 2008
Author:btongminh
Status:old
Tags:
Comment:
(bug 13718) Return the proper continue parameter for cmsort=timestamp
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryCategoryMembers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryCategoryMembers.php
@@ -72,7 +72,7 @@
7373 $this->addFields(array('cl_from', 'cl_sortkey'));
7474 }
7575
76 - $this->addFieldsIf('cl_timestamp', $fld_timestamp);
 76+ $this->addFieldsIf('cl_timestamp', $fld_timestamp || $params['sort'] == 'timestamp');
7777 $this->addTables(array('page','categorylinks')); // must be in this order for 'USE INDEX'
7878 // Not needed after bug 10280 is applied to servers
7979 if($params['sort'] == 'timestamp')
@@ -105,7 +105,10 @@
106106 if (++ $count > $limit) {
107107 // We've reached the one extra which shows that there are additional pages to be had. Stop here...
108108 // TODO: Security issue - if the user has no right to view next title, it will still be shown
109 - $this->setContinueEnumParameter('continue', $this->getContinueStr($row, $lastSortKey));
 109+ if ($params['sort'] == 'timestamp')
 110+ $this->setContinueEnumParameter('start', $row->cl_timestamp);
 111+ else
 112+ $this->setContinueEnumParameter('continue', $this->getContinueStr($row, $lastSortKey));
110113 break;
111114 }
112115
Index: trunk/phase3/RELEASE-NOTES
@@ -224,6 +224,7 @@
225225 * (bug 11673) Return error 'unknown_action' in specified format
226226 * (bug 13618) Added rcprop=redirect and rcshow=redirect to list=recentchanges
227227 * (bug 13544) Added oldid parameter to action=parse to allow for parsing of old revisions
 228+* (bug 13718) Return the proper continue parameter for cmsort=timestamp
228229
229230 === Languages updated in 1.13 ===
230231

Follow-up revisions

RevisionCommit summaryAuthorDate
r37506Backporting fixes to API that caused it to output plain wrong data:...btongminh14:37, 10 July 2008

Status & tagging log