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,13 +91,14 @@ $(document).ready( function() {
$noaccess = 0; $noaccess = 0;
$docs = []; $docs = [];
foreach ($resArr as $res) { foreach ($resArr as $res) {
$document = $dms->getDocument($res["id"]); if($document = $dms->getDocument($res["id"])) {
$document->verifyLastestContentExpriry(); $document->verifyLastestContentExpriry();
if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) {
$docs[] = $document; $docs[] = $document;
} else { } else {
$noaccess++; $noaccess++;
}
} }
} }
if($this->hasHook('filterList')) if($this->hasHook('filterList'))