r32970 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32969‎ | r32970 | r32971 >
Date:17:21, 8 April 2008
Author:brion
Status:old
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialSearch.php
@@ -30,8 +30,7 @@
3131 function wfSpecialSearch( $par = '' ) {
3232 global $wgRequest, $wgUser;
3333
34 - $search = str_replace( array('_', "\n"), " ",
35 - $wgRequest->getText( 'search', $par ) );
 34+ $search = str_replace( "\n", " ", $wgRequest->getText( 'search', $par ) );
3635 $searchPage = new SpecialSearch( $wgRequest, $wgUser );
3736 if( $wgRequest->getVal( 'fulltext' ) ||
3837 !is_null( $wgRequest->getVal( 'offset' ) ) ||
Index: trunk/phase3/RELEASE-NOTES
@@ -157,7 +157,6 @@
158158 * (bug 13576) maintenance/rebuildrecentchanges.php fails
159159 * (bug 13441) Allow Special:Recentchanges to show bots only
160160 * (bug 13431) Show true message source in Special:Allmessages&ot=php / xml
161 -* (bug 13616) Replace underscores in search terms by spaces
162161 * (bug 13463) Login successful page doesn't use user's preferred interface language
163162 * (bug 13630) Fixed warnings for pass by reference at call time in
164163 Special:Revisiondelete when generating the log entry.

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r32811(bug 13616) Replace underscores in search terms by spacesbtongminh14:57, 5 April 2008

Status & tagging log