Revert r32811 -- regression in search.
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 8 Apr 2008 17:21:36 +0000 (17:21 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 8 Apr 2008 17:21:36 +0000 (17:21 +0000)
Caused search terms containing underscores to fail, as they had the underscores silently changed to spaces.
The means it's impossible to search for many programming terms in body text, say function names like 'str_replace'.

This was listed as a fix for bug 13616, but that seems to actually be about bad links in custom 'no article' text.
The links should be corrected instead.

RELEASE-NOTES
includes/SpecialSearch.php

index 42b9d9e..9a8dce1 100644 (file)
@@ -157,7 +157,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 13576) maintenance/rebuildrecentchanges.php fails
 * (bug 13441) Allow Special:Recentchanges to show bots only
 * (bug 13431) Show true message source in Special:Allmessages&ot=php / xml
-* (bug 13616) Replace underscores in search terms by spaces
 * (bug 13463) Login successful page doesn't use user's preferred interface language
 * (bug 13630) Fixed warnings for pass by reference at call time in
   Special:Revisiondelete when generating the log entry.
index 84cce81..b16ceb1 100644 (file)
@@ -30,8 +30,7 @@
 function wfSpecialSearch( $par = '' ) {
        global $wgRequest, $wgUser;
 
-       $search = str_replace( array('_', "\n"), " ", 
-               $wgRequest->getText( 'search', $par ) );
+       $search = str_replace( "\n", " ", $wgRequest->getText( 'search', $par ) );
        $searchPage = new SpecialSearch( $wgRequest, $wgUser );
        if( $wgRequest->getVal( 'fulltext' ) ||
                !is_null( $wgRequest->getVal( 'offset' ) ) ||