mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-12 01:54: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();
|
$entries = array();
|
||||||
$searchTime = 0;
|
$searchTime = 0;
|
||||||
} else {
|
} else {
|
||||||
|
$startTime = getTime();
|
||||||
$index = $indexconf['Indexer']::open($settings->_luceneDir);
|
$index = $indexconf['Indexer']::open($settings->_luceneDir);
|
||||||
$lucenesearch = new $indexconf['Search']($index);
|
$lucenesearch = new $indexconf['Search']($index);
|
||||||
$hits = $lucenesearch->search($query, $owner ? $owner->getLogin() : '', '', $categorynames);
|
$hits = $lucenesearch->search($query, $owner ? $owner->getLogin() : '', '', $categorynames);
|
||||||
|
@ -156,11 +157,14 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$entries = array();
|
$entries = array();
|
||||||
|
$dcount = 0;
|
||||||
|
$fcount = 0;
|
||||||
if($hits) {
|
if($hits) {
|
||||||
foreach($hits as $hit) {
|
foreach($hits as $hit) {
|
||||||
if($tmp = $dms->getDocument($hit['document_id'])) {
|
if($tmp = $dms->getDocument($hit['document_id'])) {
|
||||||
if($tmp->getAccessMode($user) >= M_READ) {
|
if($tmp->getAccessMode($user) >= M_READ) {
|
||||||
$entries[] = $tmp;
|
$entries[] = $tmp;
|
||||||
|
$dcount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -419,9 +419,10 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
||||||
<?php
|
<?php
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
echo "<div class=\"span8\">\n";
|
echo "<div class=\"span8\">\n";
|
||||||
// Database search Result {{{
|
// Search Result {{{
|
||||||
$foldercount = $doccount = 0;
|
$foldercount = $doccount = 0;
|
||||||
if($entries) {
|
if($entries) {
|
||||||
|
/*
|
||||||
foreach ($entries as $entry) {
|
foreach ($entries as $entry) {
|
||||||
if(get_class($entry) == $dms->getClassname('document')) {
|
if(get_class($entry) == $dms->getClassname('document')) {
|
||||||
$doccount++;
|
$doccount++;
|
||||||
|
@ -429,6 +430,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
||||||
$foldercount++;
|
$foldercount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
print "<div class=\"alert\">".getMLText("search_report", array("doccount" => $totaldocs, "foldercount" => $totalfolders, 'searchtime'=>$searchTime))."</div>";
|
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->pageList($pageNumber, $totalpages, "../op/op.Search.php", $urlparams);
|
||||||
// $this->contentContainerStart();
|
// $this->contentContainerStart();
|
||||||
|
@ -607,7 +609,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
||||||
// $this->contentContainerEnd();
|
// $this->contentContainerEnd();
|
||||||
$this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET);
|
$this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET);
|
||||||
} else {
|
} else {
|
||||||
$numResults = $doccount + $foldercount;
|
$numResults = $totaldocs + $totalfolders;
|
||||||
if ($numResults == 0) {
|
if ($numResults == 0) {
|
||||||
print "<div class=\"alert alert-error\">".getMLText("search_no_results")."</div>";
|
print "<div class=\"alert alert-error\">".getMLText("search_no_results")."</div>";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user