first check if document is accessible before calling hook documentListRow()

This commit is contained in:
Uwe Steinmann 2017-01-17 17:31:44 +01:00
parent 24624f6136
commit 600cd490a4

View File

@ -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();