check if document content exists in hits of fulltext search

This commit is contained in:
Uwe Steinmann 2020-01-07 21:21:17 +01:00
parent 974ff603e1
commit 9b6949a00a

View File

@ -489,8 +489,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
else { else {
$document = $entry; $document = $entry;
$owner = $document->getOwner(); $owner = $document->getOwner();
$lc = $document->getLatestContent(); if($lc = $document->getLatestContent())
$version = $lc->getVersion();
$previewer->createPreview($lc); $previewer->createPreview($lc);
if (in_array(3, $searchin)) if (in_array(3, $searchin))
@ -506,7 +505,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
$belowtitle .= htmlspecialchars($path[$i]->getName())."/"; $belowtitle .= htmlspecialchars($path[$i]->getName())."/";
} }
$belowtitle .= "</span>"; $belowtitle .= "</span>";
$lcattributes = $lc->getAttributes(); $lcattributes = $lc ? $lc->getAttributes() : null;
$attrstr = ''; $attrstr = '';
if($lcattributes) { if($lcattributes) {
$attrstr .= "<table class=\"table table-condensed\">\n"; $attrstr .= "<table class=\"table table-condensed\">\n";