mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
b93e6768c4
|
@ -183,16 +183,16 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
$searchTime = 0;
|
||||
} else {
|
||||
$startTime = getTime();
|
||||
$limit = 20;
|
||||
$total = 0;
|
||||
$index = $fulltextservice->Indexer();
|
||||
if($index) {
|
||||
$limit = 20;
|
||||
$lucenesearch = $fulltextservice->Search();
|
||||
$searchresult = $lucenesearch->search($query, array('owner'=>$owner, '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) {
|
||||
$session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('splash_invalid_searchterm')));
|
||||
$dcount = 0;
|
||||
$fcount = 0;
|
||||
$total = 0;
|
||||
$totalPages = 0;
|
||||
$entries = array();
|
||||
$facets = array();
|
||||
|
@ -303,8 +303,7 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
$startFolder = $dms->getFolder($targetid);
|
||||
}
|
||||
else {
|
||||
$targetid = $settings->_rootFolderID;
|
||||
$startFolder = $dms->getFolder($targetid);
|
||||
$startFolder = $dms->getRootFolder();
|
||||
}
|
||||
if (!is_object($startFolder)) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_folder_id"));
|
||||
|
|
Loading…
Reference in New Issue
Block a user