From 63b6f47edf211f75911e8c65f22636b52aaf2f97 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 10 Apr 2005 00:03:49 +0000 Subject: [PATCH] * (bug 1853) On 'go' match, try without quotes if given quoted term --- includes/SearchEngine.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php index a49f8e5043..e1de0bb3a5 100644 --- a/includes/SearchEngine.php +++ b/includes/SearchEngine.php @@ -42,6 +42,7 @@ class SearchEngine { * If an exact title match can be find, or a very slightly close match, * return the title. If no match, returns NULL. * + * @static * @param string $term * @return Title * @access private @@ -88,6 +89,11 @@ class SearchEngine { return $title; } + # Quoted term? Try without the quotes... + if( preg_match( '/^"([^"]+)"$/', $term, $matches ) ) { + return SearchEngine::getNearMatch( $matches[1] ); + } + return NULL; } -- 2.20.1