Fix inoperable search engine
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 29 Jul 2004 01:49:49 +0000 (01:49 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 29 Jul 2004 01:49:49 +0000 (01:49 +0000)
includes/SearchEngine.php

index df71975..8c11046 100644 (file)
@@ -170,7 +170,8 @@ class SearchEngine {
                                        wfMsg( "searchhelppage" ), wfMsg( "searchingwikipedia" ) ) );
                $wgOut->addHTML( $header );
 
-               $this->parseQuery();
+               $dbr =& wfGetDB( DB_SLAVE );
+               $this->parseQuery( $dbr );
                if ( "" == $this->mTitlecond || "" == $this->mTextcond ) {
                        $wgOut->addHTML( "<h2>" . wfMsg( "badquery" ) . "</h2>\n" .
                          "<p>" . wfMsg( "badquerytext" ) . "</p>\n" );
@@ -180,7 +181,6 @@ class SearchEngine {
 
                $searchnamespaces = $this->queryNamespaces();
                $redircond = $this->searchRedirects();
-               $dbr =& wfGetDB( DB_SLAVE );
                $searchindex = $dbr->tableName( 'searchindex' );
                $cur = $dbr->tableName( 'cur' );