r40043 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40042‎ | r40043 | r40044 >
Date:20:17, 26 August 2008
Author:brion
Status:old
Tags:
Comment:
* (bug 15264) Underscores in Special:Search/Foo_bar parameters were taken
literally; now converting them to spaces per expectation.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialSearch.php
@@ -31,7 +31,11 @@
3232 function wfSpecialSearch( $par = '' ) {
3333 global $wgRequest, $wgUser;
3434
35 - $search = str_replace( "\n", " ", $wgRequest->getText( 'search', $par ) );
 35+ // Strip underscores from title parameter; most of the time we'll want
 36+ // text form here. But don't strip underscores from actual text params!
 37+ $titleParam = str_replace( '_', ' ', $par );
 38+
 39+ $search = str_replace( "\n", " ", $wgRequest->getText( 'search', $titleParam ) );
3640 $searchPage = new SpecialSearch( $wgRequest, $wgUser );
3741 if( $wgRequest->getVal( 'fulltext' )
3842 || !is_null( $wgRequest->getVal( 'offset' ))
Index: trunk/phase3/RELEASE-NOTES
@@ -1,4 +1,4 @@
2 -= MediaWiki release notes =
 2+T= MediaWiki release notes =
33
44 Security reminder: MediaWiki does not require PHP's register_globals
55 setting since version 1.2.0. If you have it on, turn it *off* if you can.
@@ -146,7 +146,10 @@
147147 * Action=purge on ForeignApiFiles now works (purges their thumbnails and
148148 description pages).
149149 * (bug 15303) Title conversion for templates wasn't working in some cases.
 150+* (bug 15264) Underscores in Special:Search/Foo_bar parameters were taken
 151+ literally; now converting them to spaces per expectation.
150152
 153+
151154 === API changes in 1.14 ===
152155
153156 * Registration time of users registered before the DB field was created is now

Status & tagging log