check if document exists

This commit is contained in:
Uwe Steinmann 2021-01-14 09:46:34 +01:00
parent feec95eff7
commit 20bc412a17

View File

@ -91,7 +91,7 @@ $(document).ready( function() {
$noaccess = 0;
$docs = [];
foreach ($resArr as $res) {
$document = $dms->getDocument($res["id"]);
if($document = $dms->getDocument($res["id"])) {
$document->verifyLastestContentExpriry();
if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) {
@ -100,6 +100,7 @@ $(document).ready( function() {
$noaccess++;
}
}
}
if($this->hasHook('filterList'))
$docs = $this->callHook('filterList', $docs, $action);
foreach($docs as $document) {