diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2004-10-20 09:56:34 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2004-10-20 09:56:34 +0000 |
commit | 8ffff3e2e073ee4ce13e35799cbec94997b65a20 (patch) | |
tree | 5825a64cb5ea070b693e12df69c0f88195502f08 /index.php | |
parent | 64829524a859a48635be349cbd49a9e75ae31a05 (diff) | |
download | mediawikicore-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.php | 11 |
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" ); |