diff --git a/browse.php b/browse.php index 3b1b9e3..c78a185 100755 --- a/browse.php +++ b/browse.php @@ -724,9 +724,15 @@ class BrowseDispatcher extends KTStandardDispatcher { $documentStr = '' . _kt('Documents: ') . ''; foreach ($aDocumentSelection as $iDocId) { $oD = Document::get($iDocId); + if (PEAR::isError($oD)) { + continue; + } if (!KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPerm, $oD)) { $this->errorRedirectToMain(_kt('You do not have permission to delete the document: ') . $oD->getName()); } + if ($oD->getImmutable()) { + $this->errorRedirectToMain(_kt('This document is immutable and cannot be deleted: ') . $oD->getName()); + } if (!PEAR::isError($oD)) { $delItems['documents'][] = $oD->getName(); }