if (empty($text)) {
$result = '*';
}
+ elseif (strpos($text, '+') !== FALSE || strpos($text, '-') !== FALSE) {
+ // if user supplies their own include/exclude operators, use text as is (with trailing wildcard)
+ $result = $this->mapWords($text, 'word*');
+ }
elseif (strpos($text, '*') !== FALSE) {
// if user supplies their own wildcards, then don't do any sophisticated changes
$result = $this->mapWords($text, '+word');
}
+ elseif (preg_match('/^(["\']).*\1$/m', $text)) {
+ // if surrounded by quotes, use term as is
+ $result = $text;
+ }
else {
switch ($mode) {
case self::MODE_NONE: