mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-26 07:40:12 +01:00
added paging support for folder: search
Change-Id: I131acec1cd71d42ba9068eaea9293706c2971a96 Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
parent
846acd9b6f
commit
578f1f2075
@ -227,7 +227,9 @@ class ModelSearchSearch extends Model {
|
|||||||
$folder_id = $folders[$data['folder']];
|
$folder_id = $folders[$data['folder']];
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $this->sphx->query("SELECT id FROM " . SPHINX_FOLDER_INDEX . " WHERE folder_id=$folder_id $sortorder LIMIT 0,$pagelen OPTION max_matches=" . MAX_SEARCH_HITS);
|
$query = $this->sphx->query("SELECT id FROM " . SPHINX_FOLDER_INDEX . " WHERE folder_id=$folder_id $sortorder LIMIT $offset,$pagelen OPTION max_matches=" . MAX_SEARCH_HITS);
|
||||||
|
$total_found = $query->total_found;
|
||||||
|
$num_rows = $query->num_rows;
|
||||||
}
|
}
|
||||||
else if(isset($data['tag']) && $data['tag']) {
|
else if(isset($data['tag']) && $data['tag']) {
|
||||||
list ($total_found, $num_rows, $id_list) = $this->get_sphinx_id_list($data['tag'], SPHINX_TAG_INDEX, 'tag', $page);
|
list ($total_found, $num_rows, $id_list) = $this->get_sphinx_id_list($data['tag'], SPHINX_TAG_INDEX, 'tag', $page);
|
||||||
|
Loading…
Reference in New Issue
Block a user