Index: trunk/phase3/includes/SearchEngine.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | # See search.doc |
4 | 4 | |
5 | 5 | class SearchEngine { |
6 | | - /* private */ var $mUsertext, $mSearchterms; |
| 6 | + /* private */ var $mRawtext, $mUsertext, $mSearchterms; |
7 | 7 | /* private */ var $mTitlecond, $mTextcond; |
8 | 8 | |
9 | 9 | var $doSearchRedirects = true; |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | global $wgDBmysql4; |
20 | 20 | $lc = SearchEngine::legalSearchChars() . "()"; |
21 | 21 | if( $wgDBmysql4 ) $lc .= "\"~<>*+-"; |
| 22 | + $this->mRawtext = $text; |
22 | 23 | $this->mUsertext = trim( preg_replace( "/[^{$lc}]/", " ", $text ) ); |
23 | 24 | $this->mSearchterms = array(); |
24 | 25 | $this->mStrictMatching = true; # Google-style, add '+' on all terms |
— | — | @@ -146,7 +147,7 @@ |
147 | 148 | function setupPage() { |
148 | 149 | global $wgOut; |
149 | 150 | $wgOut->setPageTitle( wfMsg( "searchresults" ) ); |
150 | | - $q = wfMsg( "searchquery", htmlspecialchars( $this->mUsertext ) ); |
| 151 | + $q = wfMsg( "searchquery", htmlspecialchars( $this->mRawtext ) ); |
151 | 152 | $wgOut->setSubtitle( $q ); |
152 | 153 | $wgOut->setArticleRelated( false ); |
153 | 154 | $wgOut->setRobotpolicy( "noindex,nofollow" ); |
— | — | @@ -476,7 +477,7 @@ |
477 | 478 | } |
478 | 479 | |
479 | 480 | # No match, generate an edit URL |
480 | | - $t = Title::newFromText( $wgRequest->getText( "search" ) ); |
| 481 | + $t = Title::newFromText( $this->mRawtext ); |
481 | 482 | |
482 | 483 | # If the feature is enabled, go straight to the edit page |
483 | 484 | if ( $wgGoToEdit ) { |