From: Brion Vibber Date: Tue, 8 Apr 2008 17:21:36 +0000 (+0000) Subject: Revert r32811 -- regression in search. X-Git-Tag: 1.31.0-rc.0~48528 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=e5b76c30687deadc3e7eca48298d4b1e801c3d8f;p=lhc%2Fweb%2Fwiklou.git Revert r32811 -- regression in search. 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. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 42b9d9e5c6..9a8dce1bf5 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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. diff --git a/includes/SpecialSearch.php b/includes/SpecialSearch.php index 84cce81c7d..b16ceb19d0 100644 --- a/includes/SpecialSearch.php +++ b/includes/SpecialSearch.php @@ -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' ) ) ||