From 1f08900b710020f159018f7ee29ee24da057641f Mon Sep 17 00:00:00 2001 From: "Paula V. Quispe" Date: Fri, 12 Jun 2015 17:30:18 -0400 Subject: [PATCH 1/2] PM-2939: Actions by email plugin and feature working together --- ...{class.actionsByEmail.php => class.actionsByEmailCore.php} | 2 +- workflow/engine/classes/model/AppDelegation.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename workflow/engine/classes/{class.actionsByEmail.php => class.actionsByEmailCore.php} (99%) diff --git a/workflow/engine/classes/class.actionsByEmail.php b/workflow/engine/classes/class.actionsByEmailCore.php similarity index 99% rename from workflow/engine/classes/class.actionsByEmail.php rename to workflow/engine/classes/class.actionsByEmailCore.php index b55754ab7..32614be98 100644 --- a/workflow/engine/classes/class.actionsByEmail.php +++ b/workflow/engine/classes/class.actionsByEmailCore.php @@ -1,7 +1,7 @@ verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) { - G::LoadClass('actionsByEmail'); - $actionsByEmail = new actionsByEmailClass(); + G::LoadClass('actionsByEmailCore'); + $actionsByEmail = new actionsByEmailCoreClass(); $actionsByEmail->sendActionsByEmail($data); } /*----------------------------------********---------------------------------*/ From 2a82e14fedd4c77c73b448cfc67f85a4e8c79843 Mon Sep 17 00:00:00 2001 From: "Paula V. Quispe" Date: Mon, 15 Jun 2015 10:17:14 -0400 Subject: [PATCH 2/2] PM-2939: I catch and show the error --- .../classes/class.actionsByEmailCore.php | 52 ++++++++++++------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/workflow/engine/classes/class.actionsByEmailCore.php b/workflow/engine/classes/class.actionsByEmailCore.php index 32614be98..3596ea45f 100644 --- a/workflow/engine/classes/class.actionsByEmailCore.php +++ b/workflow/engine/classes/class.actionsByEmailCore.php @@ -25,32 +25,44 @@ class actionsByEmailCoreClass extends PMPlugin { try { // Validations - if (!is_object($data)) { - throw new Exception('The parameter $data is null.'); - } + try { + if (!is_object($data)) { + throw new Exception('The parameter $data is null.'); + } + if (!isset($data->TAS_UID)) { + throw new Exception('The parameter $data->TAS_UID is null.'); + } - if (!isset($data->TAS_UID)) { - throw new Exception('The parameter $data->TAS_UID is null.'); - } + if (!isset($data->APP_UID)) { + throw new Exception('The parameter $data->APP_UID is null.'); + } - if (!isset($data->APP_UID)) { - throw new Exception('The parameter $data->APP_UID is null.'); - } + if (!isset($data->DEL_INDEX)) { + throw new Exception('The parameter $data->DEL_INDEX is null.'); + } - if (!isset($data->DEL_INDEX)) { - throw new Exception('The parameter $data->DEL_INDEX is null.'); - } + if (!isset($data->USR_UID)) { + throw new Exception('The parameter $data->USR_UID is null.'); + } - if ($data->TAS_UID == '') { - throw new Exception('The parameter $data->TAS_UID is empty.'); - } + if ($data->TAS_UID == '') { + throw new Exception('The parameter $data->TAS_UID is empty.'); + } - if ($data->APP_UID == '') { - throw new Exception('The parameter $data->APP_UID is empty.'); - } + if ($data->APP_UID == '') { + throw new Exception('The parameter $data->APP_UID is empty.'); + } - if ($data->DEL_INDEX == '') { - throw new Exception('The parameter $data->DEL_INDEX is empty.'); + if ($data->DEL_INDEX == '') { + throw new Exception('The parameter $data->DEL_INDEX is empty.'); + } + + if ($data->USR_UID == '') { + throw new Exception('The parameter $data->USR_UID is empty.'); + } + } catch(Exception $e) { + echo $e->getMessage().' Please contact to your system administrator.'; + die; } G::LoadClass('pmFunctions');