r44186 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44185‎ | r44186 | r44187 >
Date:19:33, 3 December 2008
Author:catrope
Status:ok
Tags:
Comment:
API: (bug 16548) list=search threw invalid errors under certain circumstances
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQuerySearch.php
@@ -71,14 +71,17 @@
7272 // of the way we initially set up the MySQL fulltext-based
7373 // search engine with separate title and text fields.
7474 // In the future, the default should be for a combined index.
 75+ $what = 'title';
7576 $matches = $search->searchTitle( $query );
7677
7778 // Not all search engines support a separate title search,
7879 // for instance the Lucene-based engine we use on Wikipedia.
7980 // In this case, fall back to full-text search (which will
8081 // include titles in it!)
81 - if( is_null( $matches ) )
 82+ if( is_null( $matches ) ) {
 83+ $what = 'text';
8284 $matches = $search->searchText( $query );
 85+ }
8386 }
8487 if (is_null($matches))
8588 $this->dieUsage("{$what} search is disabled",
Index: trunk/phase3/RELEASE-NOTES
@@ -488,6 +488,7 @@
489489 instead of spaces
490490 * (bug 16516) Made rvsection=T-2 work
491491 * (bug 16526) Added usprop=canemail to list=users
 492+* (bug 16548) list=search threw errors with an invalid error code
492493
493494 === Languages updated in 1.14 ===
494495

Follow-up revisions

RevisionCommit summaryAuthorDate
r44204Revert r44185, r44186 -- "Foreign repos (API or DB) now fetch images and/or d...brion23:49, 3 December 2008

Status & tagging log