mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:00:11 +01:00
fixed the search query build
This commit is contained in:
parent
ca689e4b30
commit
731c953bd6
@ -247,7 +247,7 @@ class ModelSearchSearch extends Model {
|
||||
if($data['any']) {
|
||||
$data['any'] = $this->fixup_sphinx_operators($data['any']);
|
||||
$data['any'] = $this->fix_email_address_for_sphinx($data['any']);
|
||||
if($match) { $match = "($match) & "; } $match .= "(" . $data['any'] . ") ";
|
||||
if($match) { $match = "($match) & "; } $match .= "(@subject,@body" . $data['any'] . ") ";
|
||||
}
|
||||
|
||||
|
||||
@ -277,7 +277,10 @@ class ModelSearchSearch extends Model {
|
||||
}
|
||||
}
|
||||
|
||||
$folders = "folder IN (" . implode(",", $__folders) . ") AND ";
|
||||
if(count($__folders) > 0) {
|
||||
$folders = "folder IN (" . implode(",", $__folders) . ") AND ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user