r34658 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34657‎ | r34658 | r34659 >
Date:13:33, 12 May 2008
Author:btongminh
Status:old
Tags:
Comment:
Backport API bugfixes from trunk to REL1_12 that caused PHP to spit out fatal errors:
* (bug 13442) Missing pages in prop=langlinks and prop=extlinks are now handled properly.
* (bug 13482) Disabled search types handled properly
* (bug 13836) Fixed fatal errors resulting from combining iiprop=metadata with format=xml
Modified paths:
  • /branches/REL1_12/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_12/phase3/includes/api/ApiQueryExternalLinks.php (modified) (history)
  • /branches/REL1_12/phase3/includes/api/ApiQueryLangLinks.php (modified) (history)
  • /branches/REL1_12/phase3/includes/api/ApiQuerySearch.php (modified) (history)
  • /branches/REL1_12/phase3/includes/api/ApiResult.php (modified) (history)

Diff [purge]

Index: branches/REL1_12/phase3/includes/api/ApiQueryLangLinks.php
@@ -40,6 +40,9 @@
4141 }
4242
4343 public function execute() {
 44+ if ( $this->getPageSet()->getGoodTitleCount() == 0 )
 45+ return;
 46+
4447 $this->addFields(array (
4548 'll_from',
4649 'll_lang',
Index: branches/REL1_12/phase3/includes/api/ApiQueryExternalLinks.php
@@ -40,6 +40,8 @@
4141 }
4242
4343 public function execute() {
 44+ if ( $this->getPageSet()->getGoodTitleCount() == 0 )
 45+ return;
4446
4547 $this->addFields(array (
4648 'el_from',
Index: branches/REL1_12/phase3/includes/api/ApiResult.php
@@ -147,7 +147,7 @@
148148 {
149149 if(!is_array($arr))
150150 return;
151 - foreach($arr as $a)
 151+ foreach($arr as &$a)
152152 {
153153 if(!is_array($a))
154154 continue;
Index: branches/REL1_12/phase3/includes/api/ApiQuerySearch.php
@@ -65,6 +65,9 @@
6666 $matches = $search->searchText( $query );
6767 else
6868 $matches = $search->searchTitle( $query );
 69+ if (is_null($matches))
 70+ $this->dieUsage("{$params['what']} search is disabled",
 71+ "search-{$params['what']}-disabled");
6972
7073 $data = array ();
7174 $count = 0;
Index: branches/REL1_12/phase3/RELEASE-NOTES
@@ -13,8 +13,12 @@
1414 * (bug 13532) Use proper timestamp call when reverting images
1515 * (bug 13649) Bad call to wfTimestamp()
1616 * (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
 18+ 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
1722
18 -
1923 == MediaWiki 1.12.0 ==
2024
2125 This is the quarterly branch release of MediaWiki for Winter 2008.

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r32236Missing pages in prop=langlinks and prop=extlinks are now handled properly. (...btongminh18:23, 20 March 2008
r32349(bug 13482) Disabled search types handled properlybtongminh13:16, 23 March 2008
r33910API: Make ApiResult::setIndexedTagName_recursive() actually work. This fixes ...catrope14:40, 26 April 2008

Status & tagging log