From 28480a87335e109bbe86fdab6cba411e091a055c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Apr 2021 07:05:57 +0200 Subject: [PATCH] move 'new SeedDMS_AccessOperation' after document is known --- out/out.RunSubWorkflow.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/out/out.RunSubWorkflow.php b/out/out.RunSubWorkflow.php index 3980b2e0f..b54bcef87 100644 --- a/out/out.RunSubWorkflow.php +++ b/out/out.RunSubWorkflow.php @@ -33,7 +33,6 @@ require_once("inc/inc.Authentication.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); -$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings); 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")); @@ -44,6 +43,8 @@ if (!is_object($document)) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } +$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings); + 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")); }