X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fsearch%2FSearchSqlite.php;h=2c82c7d9a55b1472d3e377964a5300ce285344b1;hb=64b83bdb3afd0ee4f8fc1893a865409c198e601e;hp=b40e1aaf38366df5b7c2510bf40005d2062cc625;hpb=bdfe02223205923d923923dd420ba0dd863cd0fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/search/SearchSqlite.php b/includes/search/SearchSqlite.php index b40e1aaf38..2c82c7d9a5 100644 --- a/includes/search/SearchSqlite.php +++ b/includes/search/SearchSqlite.php @@ -44,7 +44,7 @@ class SearchSqlite extends SearchDatabase { */ function parseQuery( $filteredText, $fulltext ) { global $wgContLang; - $lc = $this->legalSearchChars(); // Minus format chars + $lc = $this->legalSearchChars( self::CHARS_NO_SYNTAX ); // Minus syntax chars (" and *) $searchon = ''; $this->searchTerms = []; @@ -141,8 +141,13 @@ class SearchSqlite extends SearchDatabase { return $regex; } - public static function legalSearchChars() { - return "\"*" . parent::legalSearchChars(); + public static function legalSearchChars( $type = self::CHARS_ALL ) { + $searchChars = parent::legalSearchChars( $type ); + if ( $type === self::CHARS_ALL ) { + // " for phrase, * for wildcard + $searchChars = "\"*" . $searchChars; + } + return $searchChars; } /**