r93191 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93190‎ | r93191 | r93192 >
Date:15:10, 26 July 2011
Author:reedy
Status:ok
Tags:
Comment:
* (bug 29748) Add API search prefix support

Patch by TheDJ
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -28,6 +28,7 @@
2929
3030 === API changes in 1.19 ===
3131 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
 32+* (bug 29748) Add API search prefix support
3233
3334 === Languages updated in 1.19 ===
3435
Index: trunk/phase3/includes/api/ApiQuerySearch.php
@@ -69,6 +69,9 @@
7070 $search->setNamespaces( $params['namespace'] );
7171 $search->showRedirects = $params['redirects'];
7272
 73+ $query = $search->transformSearchTerm( $query );
 74+ $query = $search->replacePrefixes( $query );
 75+
7376 // Perform the actual search
7477 if ( $what == 'text' ) {
7578 $matches = $search->searchText( $query );

Status & tagging log