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