diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/WebEntry.php b/workflow/engine/src/ProcessMaker/BusinessModel/WebEntry.php index d6e6add93..a87056233 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/WebEntry.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/WebEntry.php @@ -406,6 +406,7 @@ class WebEntry $fileContent .= "\$_SESSION[\"PROCESS\"] = \"" . $processUid . "\";\n"; $fileContent .= "\$_SESSION[\"CURRENT_DYN_UID\"] = \"" . $dynaFormUid . "\";\n"; $fileContent .= "\$G_PUBLISH = new Publisher();\n"; + $fileContent .= "\$_SESSION[\"__submitFormWebEntry__\"] = false;\n"; $fileContent .= "G::LoadClass(\"pmDynaform\");\n"; $fileContent .= "\$a = new pmDynaform(array(\"CURRENT_DYNAFORM\" => \"" . $arrayWebEntryData["DYN_UID"] . "\"));\n"; diff --git a/workflow/engine/templates/processes/webentryPost.tpl b/workflow/engine/templates/processes/webentryPost.tpl index 85c80bee2..b9f29befe 100644 --- a/workflow/engine/templates/processes/webentryPost.tpl +++ b/workflow/engine/templates/processes/webentryPost.tpl @@ -16,6 +16,11 @@ define("WS_USER_PASS", "{wsPass}"); define("WS_ROUNDROBIN", "{wsRoundRobin}"); try { + if (isset($_SESSION["__submitFormWebEntry__"]) && $_SESSION["__submitFormWebEntry__"] === true) { + header("location:/sysworkflow/en/neoclassic/84823022258da8428b8bae5013752026/11315111158da8453481cb0056624392.php"); + exit(); + } + @include_once ("wsClient.php"); if (!function_exists("ws_open")){ @@ -196,6 +201,7 @@ try { $G_PUBLISH = new Publisher(); $G_PUBLISH->AddContent("xmlform", "xmlform", "login/showInfo", "", $aMessage); G::RenderPage("publish", "blank"); + $_SESSION["__submitFormWebEntry__"] = true; } catch (Exception $e) { $G_PUBLISH = new Publisher(); $suggest_message = "This web entry should be regenerated, please contact to your system administrator.";