dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8172d54
)
If asked to 'go' to a special: page title, jump directly there. Fix encoding of searc...
author
Brion Vibber
<brion@users.mediawiki.org>
Sun, 11 Apr 2004 05:28:11 +0000
(
05:28
+0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Sun, 11 Apr 2004 05:28:11 +0000
(
05:28
+0000)
includes/SearchEngine.php
patch
|
blob
|
history
diff --git
a/includes/SearchEngine.php
b/includes/SearchEngine.php
index
dd512e9
..
d9dd183
100644
(file)
--- a/
includes/SearchEngine.php
+++ b/
includes/SearchEngine.php
@@
-145,11
+145,11
@@
class SearchEngine {
# Perform the search and construct the results page
function showResults()
{
# Perform the search and construct the results page
function showResults()
{
- global $wgUser, $wgTitle, $wgOut, $wgLang, $wg
DisableTextSearch
;
- global $wgInputEncoding;
+ global $wgUser, $wgTitle, $wgOut, $wgLang, $wg
Request
;
+ global $wg
DisableTextSearch, $wg
InputEncoding;
$fname = "SearchEngine::showResults";
$fname = "SearchEngine::showResults";
- $search = $
_REQUEST['search']
;
+ $search = $
wgRequest->getText( 'search' )
;
$powersearch = $this->powersearch(); /* Need side-effects here? */
$powersearch = $this->powersearch(); /* Need side-effects here? */
@@
-418,10
+418,11
@@
class SearchEngine {
function goResult()
{
function goResult()
{
- global $wgOut, $wgDisableTextSearch;
+ global $wgOut, $wgRequest;
+ global $wgDisableTextSearch;
$fname = "SearchEngine::goResult";
$fname = "SearchEngine::goResult";
- $search
= $_REQUEST['search']
;
+ $search
= $wgRequest->getText( "search" )
;
# First try to go to page as entered.
#
# First try to go to page as entered.
#
@@
-433,7
+434,8
@@
class SearchEngine {
return;
}
return;
}
- if ( 0 != $t->getArticleID() ) {
+ # Exact match? No need to look further.
+ if ( $t->getNamespace() == NS_SPECIAL || 0 != $t->getArticleID() ) {
$wgOut->redirect( $t->getFullURL() );
return;
}
$wgOut->redirect( $t->getFullURL() );
return;
}