diff --git a/op/op.Search.php b/op/op.Search.php index 9db68a7fe..a59608e4e 100644 --- a/op/op.Search.php +++ b/op/op.Search.php @@ -130,6 +130,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { $entries = array(); $searchTime = 0; } else { + $startTime = getTime(); $index = $indexconf['Indexer']::open($settings->_luceneDir); $lucenesearch = new $indexconf['Search']($index); $hits = $lucenesearch->search($query, $owner ? $owner->getLogin() : '', '', $categorynames); @@ -156,11 +157,14 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { } $entries = array(); + $dcount = 0; + $fcount = 0; if($hits) { foreach($hits as $hit) { if($tmp = $dms->getDocument($hit['document_id'])) { if($tmp->getAccessMode($user) >= M_READ) { $entries[] = $tmp; + $dcount++; } } } diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index e1ab5049d..83d0e088f 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -419,9 +419,10 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { \n"; echo "
\n"; -// Database search Result {{{ +// Search Result {{{ $foldercount = $doccount = 0; if($entries) { + /* foreach ($entries as $entry) { if(get_class($entry) == $dms->getClassname('document')) { $doccount++; @@ -429,6 +430,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { $foldercount++; } } + */ print "
".getMLText("search_report", array("doccount" => $totaldocs, "foldercount" => $totalfolders, 'searchtime'=>$searchTime))."
"; $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $urlparams); // $this->contentContainerStart(); @@ -607,7 +609,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { // $this->contentContainerEnd(); $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET); } else { - $numResults = $doccount + $foldercount; + $numResults = $totaldocs + $totalfolders; if ($numResults == 0) { print "
".getMLText("search_no_results")."
"; }