From: Brion Vibber Date: Sun, 29 Feb 2004 07:24:47 +0000 (+0000) Subject: Go result was going straight to google fallback instead of the regular search if... X-Git-Tag: 1.3.0beta1~911 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=0147447995461cdc26dfffb3c44d62401a06e368;p=lhc%2Fweb%2Fwiklou.git Go result was going straight to google fallback instead of the regular search if a match couldn't be found. This broke correct behavior when text search is enabled. --- diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php index 0e182fc74b..40bce800c3 100644 --- a/includes/SearchEngine.php +++ b/includes/SearchEngine.php @@ -471,11 +471,11 @@ class SearchEngine { foreach( array(NS_MAIN, NS_WP, NS_USER, NS_IMAGE, NS_MEDIAWIKI) as $namespace){ $anyhit |= SearchEngine::doFuzzyTitleSearch( $search, $namespace ); } - } + } + if( ! $anyhit ){ - $wgOut->addHTML( wfMsg("notitlematches") ); + return $this->showResults(); } - $wgOut->addHTML( wfMsg( "googlesearch", htmlspecialchars( $search ), $GLOBALS['wgInputEncoding'] ) ); } /* static */ function doFuzzyTitleSearch( $search, $namespace ){