mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
pass terms to view
This commit is contained in:
parent
2310395e46
commit
5e48d724ac
|
@ -66,6 +66,7 @@ if (isset($_GET["removecategory"]) && is_numeric($_GET["removecategory"]) && $_G
|
|||
$removecategory = (int) $_GET['removecategory'];
|
||||
}
|
||||
|
||||
$terms = [];
|
||||
$limit = (isset($_GET["limit"]) && is_numeric($_GET["limit"])) ? (int) $_GET['limit'] : 20;
|
||||
$fullsearch = ((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext') || !empty($_GET["fullsearch"])) && $settings->_enableFullSearch;
|
||||
if($fullsearch) {
|
||||
|
@ -190,6 +191,7 @@ if($fullsearch) {
|
|||
$total = 0;
|
||||
$index = $fulltextservice->Indexer();
|
||||
if($index) {
|
||||
// $terms = $index->terms($_GET['query']);
|
||||
$lucenesearch = $fulltextservice->Search();
|
||||
$searchresult = $lucenesearch->search($query, array('record_type'=>$record_type, 'owner'=>$ownernames, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1))));
|
||||
if($searchresult === false) {
|
||||
|
@ -575,6 +577,7 @@ if($settings->_showSingleSearchHit && count($entries) == 1) {
|
|||
$view->setParam('changecategory', $changecategory);
|
||||
$view->setParam('removecategory', $removecategory);
|
||||
$view->setParam('searchhits', $entries);
|
||||
$view->setParam('terms', $terms);
|
||||
$view->setParam('totalpages', $totalPages);
|
||||
$view->setParam('pagenumber', $pageNumber);
|
||||
$view->setParam('limit', $limit);
|
||||
|
|
Loading…
Reference in New Issue
Block a user