r37506 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37505‎ | r37506 | r37507 >
Date:14:37, 10 July 2008
Author:btongminh
Status:old
Tags:
Comment:
Backporting fixes to API that caused it to output plain wrong data:
* (bug 11633) API: Explicitly convert redirect titles to strings due to PHP's very weak typing on array keys.
* API: Fixing main page display in meta=siteinfo
* (bug 11719) API: Remove trailing blanks in YAML output.
* (bug 13718) API: Return the proper continue parameter for cmsort=timestamp
Modified paths:
  • /branches/REL1_12/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_12/phase3/includes/api/ApiQuery.php (modified) (history)
  • /branches/REL1_12/phase3/includes/api/ApiQueryCategoryMembers.php (modified) (history)
  • /branches/REL1_12/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)

Diff [purge]

Index: branches/REL1_12/phase3/includes/api/ApiQuery.php
@@ -274,7 +274,7 @@
275275 $redirValues = array ();
276276 foreach ($pageSet->getRedirectTitles() as $titleStrFrom => $titleStrTo) {
277277 $redirValues[] = array (
278 - 'from' => $titleStrFrom,
 278+ 'from' => strval($titleStrFrom),
279279 'to' => $titleStrTo
280280 );
281281 }
Index: branches/REL1_12/phase3/includes/api/ApiQuerySiteinfo.php
@@ -75,7 +75,7 @@
7676
7777 $data = array ();
7878 $mainPage = Title :: newFromText(wfMsgForContent('mainpage'));
79 - $data['mainpage'] = $mainPage->getText();
 79+ $data['mainpage'] = $mainPage->getPrefixedText();
8080 $data['base'] = $mainPage->getFullUrl();
8181 $data['sitename'] = $wgSitename;
8282 $data['generator'] = "MediaWiki $wgVersion";
Index: branches/REL1_12/phase3/includes/api/ApiQueryCategoryMembers.php
@@ -78,7 +78,7 @@
7979 $this->addFields(array('cl_from', 'cl_sortkey'));
8080 }
8181
82 - $this->addFieldsIf('cl_timestamp', $fld_timestamp);
 82+ $this->addFieldsIf('cl_timestamp', $fld_timestamp || $params['sort'] == 'timestamp');
8383 $this->addTables(array('page','categorylinks')); // must be in this order for 'USE INDEX'
8484 // Not needed after bug 10280 is applied to servers
8585 if($params['sort'] == 'timestamp')
@@ -111,7 +111,10 @@
112112 if (++ $count > $limit) {
113113 // We've reached the one extra which shows that there are additional pages to be had. Stop here...
114114 // TODO: Security issue - if the user has no right to view next title, it will still be shown
115 - $this->setContinueEnumParameter('continue', $this->getContinueStr($row, $lastSortKey));
 115+ if ($params['sort'] == 'timestamp')
 116+ $this->setContinueEnumParameter('start', $row->cl_timestamp);
 117+ else
 118+ $this->setContinueEnumParameter('continue', $this->getContinueStr($row, $lastSortKey));
116119 break;
117120 }
118121
Index: branches/REL1_12/phase3/RELEASE-NOTES
@@ -12,13 +12,19 @@
1313 * (bug 12077) Fix HTML nesting for TOC
1414 * (bug 13532) Use proper timestamp call when reverting images
1515 * (bug 13649, 14084) Bad call to wfTimestamp()
16 -* (bug 13770) Use Preprocessor_Hash by default to avoid missing DOM module errors
17 -* (bug 13442) Missing pages in prop=langlinks and prop=extlinks are now
 16+* (bug 13770) Use Preprocessor_Hash by default to avoid missing DOM module
 17+ errors
 18+* (bug 13442) API: Missing pages in prop=langlinks and prop=extlinks are now
1819 handled properly.
19 -* (bug 13482) Disabled search types handled properly
20 -* (bug 13836) Fixed fatal errors resulting from combining iiprop=metadata with
21 - format=xml
22 -
 20+* (bug 13482) API: Disabled search types handled properly
 21+* (bug 13836) API: Fixed fatal errors resulting from combining iiprop=metadata
 22+ with format=xml
 23+* (bug 11633) API: Explicitly convert redirect titles to strings due to PHP's
 24+ very weak typing on array keys.
 25+* API: Fixing main page display in meta=siteinfo
 26+* (bug 11719) API: Remove trailing blanks in YAML output.
 27+* (bug 13718) API: Return the proper continue parameter for cmsort=timestamp
 28+
2329 == MediaWiki 1.12.0 ==
2430
2531 This is the quarterly branch release of MediaWiki for Winter 2008.

Follow-up revisions

RevisionCommit summaryAuthorDate
r47865API: Some cleanup...catrope16:03, 27 February 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r32485API: (bug 11719) Remove trailing blanks in YAML output.amidaniel23:19, 26 March 2008
r32820(bug 11633) Explicitly convert redirect titles to strings due to PHP's very w...btongminh18:34, 5 April 2008
r33256(bug 13718) Return the proper continue parameter for cmsort=timestampbtongminh19:17, 13 April 2008

Status & tagging log