From ab866e577901bf96cf8c4f1890434601e58aaf4f Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Fri, 30 Jun 2017 15:15:58 -0400 Subject: [PATCH] HOR-3366 --- .../engine/content/translations/english/processmaker.en.po | 6 ++++++ workflow/engine/data/mysql/insert.sql | 3 ++- .../engine/src/ProcessMaker/BusinessModel/WebEntryEvent.php | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/workflow/engine/content/translations/english/processmaker.en.po b/workflow/engine/content/translations/english/processmaker.en.po index 36fffe016..d2c2fe3b9 100644 --- a/workflow/engine/content/translations/english/processmaker.en.po +++ b/workflow/engine/content/translations/english/processmaker.en.po @@ -15439,6 +15439,12 @@ msgstr "Add users" msgid "Remove selected" msgstr "Remove selected" +# TRANSLATION +# LABEL/ENTER_VALID_URL +#: LABEL/ENTER_VALID_URL +msgid "Enter a valid URL to be redirected when entry will be completed" +msgstr "Enter a valid URL to be redirected when entry will be completed" + # TRANSLATION # LABEL/ID_EVENT_ADD_DYNAVAR #: LABEL/ID_EVENT_ADD_DYNAVAR diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index b29ea7630..383766d5a 100644 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -4068,7 +4068,8 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_SMTP_ERROR_MET_TURN_SMTP_NOT_IMPLEMENTED','en','The method TURN of the SMTP is not implemented','2014-10-21') , ( 'LABEL','ID_EVENT_ADD_CURRENT','en','Add current task user','2014-02-12') , ( 'LABEL','ID_EVENT_ADD_USERS','en','Add users','2014-02-12') , -( 'LABEL','ID_EVENT_REMOVE_SELECTED','en','Remove selected','2014-02-12') ; +( 'LABEL','ID_EVENT_REMOVE_SELECTED','en','Remove selected','2014-02-12') , +( 'LABEL','ENTER_VALID_URL','en','Enter a valid URL to be redirected when entry will be completed','2014-06-30') ; INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES ( 'LABEL','ID_EVENT_ADD_DYNAVAR','en','Add dynavar','2014-02-12') , diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/WebEntryEvent.php b/workflow/engine/src/ProcessMaker/BusinessModel/WebEntryEvent.php index b468fb449..225ddf660 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/WebEntryEvent.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/WebEntryEvent.php @@ -350,6 +350,10 @@ class WebEntryEvent if (!empty($arrayData["USR_UID"])) { $process->throwExceptionIfNotExistsUser($arrayData["USR_UID"], $this->arrayFieldNameForException["userUid"]); } + + if ($arrayData["WE_CALLBACK"] === "CUSTOM" && empty($arrayData["WE_CALLBACK_URL"])) { + throw new \Exception(\G::LoadTranslation("ENTER_VALID_URL")); + } } catch (\Exception $e) { throw $e; }