r47188 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47187‎ | r47188 | r47189 >
Date:17:27, 12 February 2009
Author:catrope
Status:ok
Tags:
Comment:
API: Fix up r47142: use a boolean parameter for suggest
Modified paths:
  • /trunk/phase3/includes/SearchEngine.php (modified) (history)
  • /trunk/phase3/includes/api/ApiOpenSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SearchEngine.php
@@ -403,7 +403,7 @@
404404 if($wgMWSuggestTemplate)
405405 return $wgMWSuggestTemplate;
406406 else
407 - return $wgServer . $wgScriptPath . '/api.php?action=opensearch&search={searchTerms}&namespace={namespaces}&suggest=1';
 407+ return $wgServer . $wgScriptPath . '/api.php?action=opensearch&search={searchTerms}&namespace={namespaces}&suggest';
408408 }
409409 }
410410
Index: trunk/phase3/includes/api/ApiOpenSearch.php
@@ -77,9 +77,7 @@
7878 ApiBase :: PARAM_TYPE => 'namespace',
7979 ApiBase :: PARAM_ISMULTI => true
8080 ),
81 - 'suggest' => array(
82 - ApiBase :: PARAM_TYPE => 'integer'
83 - ),
 81+ 'suggest' => false,
8482 );
8583 }
8684
@@ -88,6 +86,7 @@
8987 'search' => 'Search string',
9088 'limit' => 'Maximum amount of results to return',
9189 'namespace' => 'Namespaces to search',
 90+ 'suggest' => 'Do nothing if $wgEnableMWSuggest is false',
9291 );
9392 }
9493

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r47142Add suggest=1 to search suggestion AJAX request. ApiOpenSearch won't execute ...aaron15:56, 11 February 2009

Status & tagging log