From 939d212175d593c11a33cbd3eac806302e91b47e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 6 Feb 2019 13:11:49 +0100 Subject: [PATCH] call hook to get document content --- views/bootstrap/class.Bootstrap.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index d54ee4d7a..e15305f65 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2183,10 +2183,15 @@ $(document).ready( function() { if(!$skipcont) $content .= ""; - if($version) - $latestContent = $document->getContentByVersion($version); - else - $latestContent = $document->getLatestContent(); + if($version) { + $latestContent = $this->callHook('documentContent', $document, $version); + if($latestContent === null) + $latestContent = $document->getContentByVersion($version); + } else { + $latestContent = $this->callHook('documentLatestContent', $document); + if($latestContent === null) + $latestContent = $document->getLatestContent(); + } if($latestContent) { $previewer->createPreview($latestContent);