X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fsearch%2FSearchOracle.php;h=8bcd78fa6661019fc90e279c091dabab8ae6589b;hp=2e6cb84ca6a393281fefef8f122019b5cec0968b;hb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;hpb=9fde467caca76dbefb984f23736904cf8f2bcdb8 diff --git a/includes/search/SearchOracle.php b/includes/search/SearchOracle.php index 2e6cb84ca6..8bcd78fa66 100644 --- a/includes/search/SearchOracle.php +++ b/includes/search/SearchOracle.php @@ -174,7 +174,7 @@ class SearchOracle extends SearchDatabase { */ function parseQuery( $filteredText, $fulltext ) { global $wgContLang; - $lc = $this->legalSearchChars(); + $lc = $this->legalSearchChars( self::CHARS_NO_SYNTAX ); $this->searchTerms = []; # @todo FIXME: This doesn't handle parenthetical expressions. @@ -266,7 +266,11 @@ class SearchOracle extends SearchDatabase { [] ); } - public function legalSearchCharsForUpdate() { - return "\"" . parent::legalSearchCharsForUpdate(); + public static function legalSearchChars( $type = self::CHARS_ALL ) { + $searchChars = parent::legalSearchChars( $type ); + if ( $type === self::CHARS_ALL ) { + $searchChars = "\"" . $searchChars; + } + return $searchChars; } }