mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 23:24:57 +00:00
Merge branch 'seeddms-4.3.x' into seeddms-5.0.x
This commit is contained in:
commit
784081b5d3
|
@ -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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -419,9 +419,10 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
|||
<?php
|
||||
echo "</div>\n";
|
||||
echo "<div class=\"span8\">\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 "<div class=\"alert\">".getMLText("search_report", array("doccount" => $totaldocs, "foldercount" => $totalfolders, 'searchtime'=>$searchTime))."</div>";
|
||||
$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 "<div class=\"alert alert-error\">".getMLText("search_no_results")."</div>";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user