getUser(); $document = $link->getDocument(); $version = $ling->getVersion(); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $controller = Controller::factory($tmp[1]); $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); if (!$accessop->check_controller_access($controller, $_POST)) { UI::exitError(getMLText("document_title", array("documentname" => "")),getMLText("access_denied")); } if (!is_object($document)) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } if ($document->getAccessMode($user) < M_READ) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } $content = $document->getContentByVersion($version); if (!is_object($content)) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } $controller->setParam('content', $content); $controller->version(); } /* }}} */ add_log_line(); exit();