From 8c12ecd0b229564caaf5de58e2f25f711fa7e6ee Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 18 Aug 2022 13:05:02 +0200 Subject: [PATCH 1/2] add fold marks --- views/bootstrap/class.Search.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index ed7d71f0c..67d57ef18 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -341,6 +341,7 @@ function typeahead() { /* {{{ */ $content = ob_get_clean(); $this->printAccordion(getMLText('filter_for_documents_and_folders'), $content, $openfilterdlg); + // Seach options for documents {{{ /* First check if any of the folder filters are set. If it is, * open the accordion. */ @@ -438,8 +439,9 @@ function typeahead() { /* {{{ */ } } } -?> -printAccordion(getMLText('filter_for_documents'), $content, $openfilterdlg); /* First check if any of the folder filters are set. If it is, @@ -477,6 +479,10 @@ function typeahead() { /* {{{ */ \n"; ?> @@ -621,6 +627,7 @@ function typeahead() { /* {{{ */ \n"; } + // }}} ?> Date: Thu, 18 Aug 2022 13:18:00 +0200 Subject: [PATCH 2/2] sync code with seeddms6 (no functional changes) --- out/out.Search.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/out/out.Search.php b/out/out.Search.php index 77387ebfe..9238d56d0 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -49,8 +49,6 @@ if (isset($_GET["navBar"])) { } } -$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); - $fullsearch = ((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext') || !empty($_GET["fullsearch"])) && $settings->_enableFullSearch; if($fullsearch) { // Search in Fulltext {{{ @@ -539,10 +537,20 @@ if($settings->_showSingleSearchHit && count($entries) == 1) { } } else { $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); - $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'query'=>$query, 'searchhits'=>$entries, 'totalpages'=>$totalPages, 'pagenumber'=>$pageNumber, 'searchtime'=>$searchTime, 'urlparams'=>$_GET, 'cachedir'=>$settings->_cacheDir)); + $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); + $accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); if($view) { $view->setParam('facets', $facets); $view->setParam('accessobject', $accessop); + $view->setParam('query', $query); + $view->setParam('includecontent', $includecontent); + $view->setParam('searchhits', $entries); + $view->setParam('totalpages', $totalPages); + $view->setParam('pagenumber', $pageNumber); + $view->setParam('limit', $limit); + $view->setParam('searchtime', $searchTime); + $view->setParam('urlparams', $_GET); + $view->setParam('cachedir', $settings->_cacheDir); $view->setParam('onepage', $settings->_onePageMode); // do most navigation by reloading areas of pages with ajax $view->setParam('showtree', showtree()); $view->setParam('enableRecursiveCount', $settings->_enableRecursiveCount); @@ -586,6 +594,7 @@ if($settings->_showSingleSearchHit && count($entries) == 1) { $view->setParam('conversionmgr', $conversionmgr); $view->setParam('timeout', $settings->_cmdTimeout); $view->setParam('xsendfile', $settings->_enableXsendfile); + $view->setParam('showsinglesearchhit', $settings->_showSingleSearchHit); $view($_GET); exit; }