Merge "Align "What's this" vertically"
[lhc/web/wiklou.git] / includes / search / SearchOracle.php
index c5a5ef1..8bcd78f 100644 (file)
@@ -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 static function legalSearchChars() {
-               return "\"" . parent::legalSearchChars();
+       public static function legalSearchChars( $type = self::CHARS_ALL ) {
+               $searchChars = parent::legalSearchChars( $type );
+               if ( $type === self::CHARS_ALL ) {
+                       $searchChars = "\"" . $searchChars;
+               }
+               return $searchChars;
        }
 }