From 600cd490a4168cef91ec1f74ff3e0967ffae7e1e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 17 Jan 2017 17:31:44 +0100 Subject: [PATCH] first check if document is accessible before calling hook documentListRow() --- views/bootstrap/class.MyDocuments.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index 53a312d06..24b2fd46d 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -87,15 +87,14 @@ $(document).ready( function() { $document = $dms->getDocument($res["id"]); $document->verifyLastestContentExpriry(); - $txt = $this->callHook('documentListItem', $document, $previewer); - if(is_string($txt)) - echo $txt; - else { - if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $txt = $this->callHook('documentListItem', $document, $previewer); + if(is_string($txt)) + echo $txt; + else echo $this->documentListRow($document, $previewer, false, $res['version']); - } else { - $noaccess++; - } + } else { + $noaccess++; } } $this->printListFooter();