mirror of
https://bitbucket.org/jsuto/piler.git
synced 2026-10-01 13:00:20 +02:00
search query quote support
This commit is contained in:
1 parent
668630fb53
commit
cdd78a5ad8
2 files changed
+21
-1
No files matched your search
@@ -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