aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@users.mediawiki.org>2004-10-20 09:56:34 +0000
committerBrion Vibber <brion@users.mediawiki.org>2004-10-20 09:56:34 +0000
commit8ffff3e2e073ee4ce13e35799cbec94997b65a20 (patch)
tree5825a64cb5ea070b693e12df69c0f88195502f08 /index.php
parent64829524a859a48635be349cbd49a9e75ae31a05 (diff)
downloadmediawikicore-8ffff3e2e073ee4ce13e35799cbec94997b65a20.tar.gz
mediawikicore-8ffff3e2e073ee4ce13e35799cbec94997b65a20.zip
Reorganization of SearchEngine for legibility
* Removed 'fuzzy title search', it's not been maintained and generally produces unexpected and unwanted results * Separated search guts (in SearchEngine) from display/control (in SpecialSearch) * Extracted MySQL3 and MySQL4 variants to subclasses * Added PHPUnit tests for MySQL3 and MySQL4 search engines, which try to use temporary tables to fiddle in (if configured) * comments n stuff
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/5980
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 2 insertions, 9 deletions
diff --git a/index.php b/index.php
index dec3d897a537..e4d71b588d97 100644
--- a/index.php
+++ b/index.php
@@ -62,16 +62,9 @@ if ( !is_null( $wgTitle ) && !$wgTitle->userCanRead() ) {
wfProfileIn( "main-action" );
$search = $wgRequest->getText( 'search' );
if( !is_null( $search ) && $search !== '' ) {
- require_once( 'includes/SearchEngine.php' );
+ require_once( 'includes/SpecialSearch.php' );
$wgTitle = Title::makeTitle( NS_SPECIAL, "Search" );
- $searchEngine = new SearchEngine( $search );
- if( $wgRequest->getVal( 'fulltext' ) ||
- !is_null( $wgRequest->getVal( 'offset' ) ) ||
- !is_null ($wgRequest->getVal( 'searchx' ) ) ) {
- $searchEngine->showResults();
- } else {
- $searchEngine->goResult();
- }
+ wfSpecialSearch();
} else if( !$wgTitle or $wgTitle->getDBkey() == "" ) {
$wgTitle = Title::newFromText( wfMsgForContent( "badtitle" ) );
$wgOut->errorpage( "badtitle", "badtitletext" );