search query quote support

This commit is contained in:
SJ
2015-06-02 13:17:27 +02:00
parent 668630fb53
commit cdd78a5ad8
2 changed files with 21 additions and 1 deletions

View File

@ -166,6 +166,24 @@ class ModelSearchSearch extends Model {
$i++;
}
if(SEARCH_QUERY_QUOTING == 1) {
$quoting = 0;
for($i=2; $i<count($data['match']); $i++) {
if(preg_match("/^\"/", $data['match'][$i])) {
$quoting = 1;
}
if($quoting == 0) {
$data['match'][$i] = '"' . $data['match'][$i] . '"';
}
if(preg_match("/\"$/", $data['match'][$i])) {
$quoting = 0;
}
}
}
$match = implode(" ", $data['match']);
if($emailfilter) {