Merged in paulis/processmaker/PM-2939 (pull request #2339)

PM-2939: Actions by email plugin and feature working together
This commit is contained in:
Julio Cesar Laura Avendaño
2015-06-15 11:24:05 -04:00
2 changed files with 35 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
<?php
class actionsByEmailClass extends PMPlugin
class actionsByEmailCoreClass extends PMPlugin
{
public function __construct()
{
@@ -25,32 +25,44 @@ class actionsByEmailClass 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');

View File

@@ -188,8 +188,8 @@ class AppDelegation extends BaseAppDelegation
if (PMLicensedFeatures
::getSingleton()
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
G::LoadClass('actionsByEmail');
$actionsByEmail = new actionsByEmailClass();
G::LoadClass('actionsByEmailCore');
$actionsByEmail = new actionsByEmailCoreClass();
$actionsByEmail->sendActionsByEmail($data);
}
/*----------------------------------********---------------------------------*/