diff --git a/op/op.CreateDownloadLink.php b/op/op.CreateDownloadLink.php deleted file mode 100644 index 5f39aa2da..000000000 --- a/op/op.CreateDownloadLink.php +++ /dev/null @@ -1,73 +0,0 @@ - getMLText("invalid_request_token"))),getMLText("invalid_request_token")); -} - -if (!isset($_POST["documentid"]) || !is_numeric($_POST["documentid"]) || intval($_POST["documentid"])<1) { - UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); -} -$documentid = $_POST["documentid"]; -$document = $dms->getDocument($documentid); - -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")); -} - -if (!isset($_POST["version"]) || !is_numeric($_POST["version"]) || intval($_POST["version"])<1) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); -} - -$version_num = $_POST["version"]; -$version = $document->getContentByVersion($version_num); - -if (!is_object($version)) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); -} -if (isset($_POST["expdate"])) - $expiration = $_POST["expdate"]; -else - $expiration = null; - -if($version->createDownloadLink($user, $expiration)) { - $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_create_download_link'))); -} else { - $session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('splash_error_create_download+link'))); -} - -add_log_line("?documentid=".$documentid."&version".$version_num); - -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); - -?> diff --git a/out/out.CreateDownloadLink.php b/out/out.CreateDownloadLink.php deleted file mode 100644 index 291fa6e10..000000000 --- a/out/out.CreateDownloadLink.php +++ /dev/null @@ -1,72 +0,0 @@ -$dms, 'user'=>$user)); -$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); -if (!$accessop->check_view_access($view, $_GET)) { - UI::exitError(getMLText("document_title", array("documentname" => '')),getMLText("access_denied")); -} - -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")); -} - -if ($document->getAccessMode($user) < M_ALL) { - UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); -} - -if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"]<1)) { - UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); -} - -$content = $document->getContentByVersion($_GET["version"]); -if (!is_object($content)) { - UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); -} - -$folder = $document->getFolder(); - -if($view) { - $view->setParam('folder', $folder); - $view->setParam('document', $document); - $view->setParam('version', $content); - $view->setParam('accessobject', $accessop); - $view($_GET); - exit; -} - -?> diff --git a/views/bootstrap/class.CreateDownloadLink.php b/views/bootstrap/class.CreateDownloadLink.php deleted file mode 100644 index df506864a..000000000 --- a/views/bootstrap/class.CreateDownloadLink.php +++ /dev/null @@ -1,76 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.Bootstrap.php"); - -/** - * Class which outputs the html page for CreateDownloadLink view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_CreateDownloadLink extends SeedDMS_Bootstrap_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $transmittals = $this->params['transmittals']; - $content = $this->params['version']; - - $document = $content->getDocument(); - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation(); - $this->contentStart(); - $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); - $this->contentHeading(getMLText("create_download_link")); - $this->contentContainerStart(); - -?> -
- - - - - -
- -
- - - - -
-
-
- -
- -
-contentContainerEnd(); - $this->contentEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?>