mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 17:40:11 +01:00
permission fix for attachment search
This commit is contained in:
parent
c12f32fbd4
commit
6e8c3e5cda
@ -215,7 +215,11 @@ class ModelSearchSearch extends Model {
|
|||||||
|
|
||||||
|
|
||||||
if(isset($data['aname']) && $data['aname']) {
|
if(isset($data['aname']) && $data['aname']) {
|
||||||
$query = $this->sphx->query("SELECT id, mid FROM " . SPHINX_ATTACHMENT_INDEX . " WHERE MATCH('" . $data['aname'] . "') $sortorder LIMIT 0," . MAX_SEARCH_HITS . " OPTION max_matches=" . MAX_SEARCH_HITS);
|
|
||||||
|
$match = $data['aname'];
|
||||||
|
if($emailfilter) { $match = "( $match ) & $emailfilter"; }
|
||||||
|
|
||||||
|
$query = $this->sphx->query("SELECT id, mid FROM " . SPHINX_ATTACHMENT_INDEX . " WHERE MATCH('" . $match . "') ORDER BY `id` $order LIMIT 0," . MAX_SEARCH_HITS . " OPTION max_matches=" . MAX_SEARCH_HITS);
|
||||||
}
|
}
|
||||||
else if(isset($data['tag']) && $data['tag']) {
|
else if(isset($data['tag']) && $data['tag']) {
|
||||||
$id_list = $this->get_sphinx_id_list($data['tag'], SPHINX_TAG_INDEX, 'tag');
|
$id_list = $this->get_sphinx_id_list($data['tag'], SPHINX_TAG_INDEX, 'tag');
|
||||||
|
Loading…
Reference in New Issue
Block a user