show single doc/folder only if the search returns 1 hit

till now it could happen, that if the last page of a search result contained
only 1 record, then this record was shown.
This commit is contained in:
Uwe Steinmann 2014-04-09 10:50:17 +02:00
parent 0b74a2d3e7
commit 4d094b2920

View File

@ -407,7 +407,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) {
// -------------- Output results --------------------------------------------
if(count($entries) == 1) {
if(count($entries) == 1 && ($resArr['totalDocs'] + $resArr['totalFolders']) == 1) {
$entry = $entries[0];
if(get_class($entry) == 'SeedDMS_Core_Document') {
header('Location: ../out/out.ViewDocument.php?documentid='.$entry->getID());