From 0147447995461cdc26dfffb3c44d62401a06e368 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 29 Feb 2004 07:24:47 +0000 Subject: [PATCH] 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. --- includes/SearchEngine.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ){ -- 2.20.1