mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:17:02 +02:00
search query quote support
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user