From 76fb2dba7e957d9ed16c7092fe5aab234ef4f501 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Sun, 10 Jan 2010 10:02:55 +0000 Subject: [PATCH] Cleared SearchSqlite from some mysqlisms from r58322 --- includes/search/SearchSqlite.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/includes/search/SearchSqlite.php b/includes/search/SearchSqlite.php index 404b4a4dae..b5f45e1ba2 100644 --- a/includes/search/SearchSqlite.php +++ b/includes/search/SearchSqlite.php @@ -26,8 +26,6 @@ * @ingroup Search */ class SearchSqlite extends SearchEngine { - var $strictMatching = true; - // Cached because SearchUpdate keeps recreating our class private static $fulltextSupported = null; @@ -64,7 +62,6 @@ class SearchSqlite extends SearchEngine { $searchon = ''; $this->searchTerms = array(); - # FIXME: This doesn't handle parenthetical expressions. $m = array(); if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/', $filteredText, $m, PREG_SET_ORDER ) ) { @@ -78,13 +75,9 @@ class SearchSqlite extends SearchEngine { $term = str_replace( '"', '', $term ); $quote = '"'; } - + if( $searchon !== '' ) $searchon .= ' '; - if( $this->strictMatching && ($modifier == '') ) { - // If we leave this out, boolean op defaults to OR which is rarely helpful. - $modifier = '+'; - } - + // Some languages such as Serbian store the input form in the search index, // so we may need to search for matches in multiple writing system variants. $convertedVariants = $wgContLang->autoConvertToAllVariants( $term ); @@ -127,8 +120,7 @@ class SearchSqlite extends SearchEngine { $regexp = $this->regexTerm( $term, $wildcard ); $this->searchTerms[] = $regexp; } - wfDebug( __METHOD__ . ": Would search with '$searchon'\n" ); - wfDebug( __METHOD__ . ': Match with /' . implode( '|', $this->searchTerms ) . "/\n" ); + } else { wfDebug( __METHOD__ . ": Can't understand search query '{$filteredText}'\n" ); } -- 2.20.1