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