$dms, 'user'=>$user)); if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"]<1)) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } $document = $dms->getDocument($_GET["documentid"]); if (!is_object($document)) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } $folder = $document->getFolder(); if ($document->getAccessMode($user) < M_READ) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); } /* Create object for checking access to certain operations */ $accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings); if($view) { $view->setParam('folder', $folder); $view->setParam('document', $document); $view->setParam('sortusersinlist', $settings->_sortUsersInList); $view->setParam('enableusersview', $settings->_enableUsersView); $view->setParam('accessobject', $accessop); $view($_GET); exit; }