From dabf821b6a0d9a368a70a3fa8be7cbbcc600d83d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 28 Nov 2019 09:18:01 +0100 Subject: [PATCH] do not run documentListRow(Start|End) if lastContent is null --- views/bootstrap/class.Bootstrap.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index b82fd9e02..86cf25c6e 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2477,9 +2477,6 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; $docID = $document->getID(); - if(!$skipcont) - $content .= $this->documentListRowStart($document); - if($version) { $latestContent = $this->callHook('documentContent', $document, $version); if($latestContent === null) @@ -2491,6 +2488,9 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e } if($latestContent) { + if(!$skipcont) + $content .= $this->documentListRowStart($document); + $previewer->createPreview($latestContent); $version = $latestContent->getVersion(); $status = $latestContent->getStatus(); @@ -2610,9 +2610,9 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e } $content .= ""; $content .= ""; + if(!$skipcont) + $content .= $this->documentListRowEnd($document); } - if(!$skipcont) - $content .= $this->documentListRowEnd($document); return $content; } /* }}} */