BUG 6910 "Error al pasar a otra ventana con una alerta en mail" solved
- a validation was missing, bug fixed
This commit is contained in:
@@ -4135,14 +4135,23 @@ class Cases {
|
||||
$aConfiguration = array();
|
||||
}
|
||||
}
|
||||
if (isset($aConfiguration['MESS_ENABLED']) && $aConfiguration['MESS_ENABLED'] == '1') {
|
||||
|
||||
if (!isset($aConfiguration['MESS_ENABLED']) || $aConfiguration['MESS_ENABLED'] != '1') {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Send derivation notification - Start
|
||||
$oTask = new Task();
|
||||
$aTaskInfo = $oTask->load($sCurrentTask);
|
||||
if ($aTaskInfo['TAS_SEND_LAST_EMAIL'] == 'TRUE') {
|
||||
|
||||
if ($aTaskInfo['TAS_SEND_LAST_EMAIL'] != 'TRUE') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($sFrom == '') {
|
||||
$sFrom = '"ProcessMaker"';
|
||||
}
|
||||
|
||||
if (($aConfiguration['MESS_ENGINE'] != 'MAIL') && ($aConfiguration['MESS_ACCOUNT'] != '')) {
|
||||
$sFrom .= ' <' . $aConfiguration['MESS_ACCOUNT'] . '>';
|
||||
} else {
|
||||
@@ -4188,13 +4197,14 @@ class Cases {
|
||||
$sBody = nl2br(G::replaceDataField($aTaskInfo['TAS_DEF_MESSAGE'], $aFields));
|
||||
}
|
||||
|
||||
|
||||
G::LoadClass('spool');
|
||||
$oUser = new Users();
|
||||
foreach ($aTasks as $aTask) {
|
||||
if (isset($aTask['USR_UID'])) {
|
||||
$aUser = $oUser->load($aTask['USR_UID']);
|
||||
|
||||
$sTo = ((($aUser['USR_FIRSTNAME'] != '') || ($aUser['USR_LASTNAME'] != '')) ? $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' ' : '') . '<' . $aUser['USR_EMAIL'] . '>';
|
||||
|
||||
$oSpool = new spoolRun();
|
||||
$oSpool->setConfig(array('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],
|
||||
'MESS_SERVER' => $aConfiguration['MESS_SERVER'],
|
||||
@@ -4223,9 +4233,9 @@ class Cases {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Send derivation notification - End
|
||||
}
|
||||
|
||||
} catch (Exception $oException) {
|
||||
throw $oException;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,11 @@ try {
|
||||
$oUser = new Users();
|
||||
$aUser = $oUser->load($_SESSION['USER_LOGGED']);
|
||||
$sFromName = '"' . $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . '"';
|
||||
try {
|
||||
$oCase->sendNotifications($_SESSION['TASK'], $_POST['form']['TASKS'], $appFields['APP_DATA'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $sFromName);
|
||||
} catch(Exception $e){
|
||||
G::SendTemporalMessage(G::loadTranslation('ID_NOTIFICATION_ERROR').' - '. $e->getMessage(), 'warning', 'string', null, '100%');
|
||||
}
|
||||
// Send notifications - End
|
||||
|
||||
// Events - Start
|
||||
|
||||
Reference in New Issue
Block a user