Error management
This commit is contained in:
parent
cc29654f47
commit
efe60ebc58
@ -387,7 +387,7 @@ if (empty($reshook) && $action == 'add')
|
|||||||
$moreparam = '';
|
$moreparam = '';
|
||||||
if ($user->id != $object->userownerid) $moreparam = "filtert=-1"; // We force to remove filter so created record is visible when going back to per user view.
|
if ($user->id != $object->userownerid) $moreparam = "filtert=-1"; // We force to remove filter so created record is visible when going back to per user view.
|
||||||
|
|
||||||
//Reminder
|
//Create eminder
|
||||||
if($addreminder == 'on'){
|
if($addreminder == 'on'){
|
||||||
|
|
||||||
$actionCommReminder = new ActionCommReminder($db);
|
$actionCommReminder = new ActionCommReminder($db);
|
||||||
@ -416,6 +416,15 @@ if (empty($reshook) && $action == 'add')
|
|||||||
if($remindertype == 'email') $actionCommReminder->fk_email_template = $modelmail;
|
if($remindertype == 'email') $actionCommReminder->fk_email_template = $modelmail;
|
||||||
|
|
||||||
$res = $actionCommReminder->create($user);
|
$res = $actionCommReminder->create($user);
|
||||||
|
|
||||||
|
if($res <= 0){
|
||||||
|
// If error
|
||||||
|
$db->rollback();
|
||||||
|
$langs->load("errors");
|
||||||
|
$error = $langs->trans('ErrorReminderActionCommCreation');
|
||||||
|
setEventMessages($error, null, 'errors');
|
||||||
|
$action = 'create'; $donotclearsession = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|||||||
@ -1082,3 +1082,4 @@ MODIFYInDolibarr=Record %s modified
|
|||||||
DELETEInDolibarr=Record %s deleted
|
DELETEInDolibarr=Record %s deleted
|
||||||
VALIDATEInDolibarr=Record %s validated
|
VALIDATEInDolibarr=Record %s validated
|
||||||
APPROVEDInDolibarr=Record %s approved
|
APPROVEDInDolibarr=Record %s approved
|
||||||
|
ErrorReminderActionCommCreation=Error creating the reminder notification for this event
|
||||||
@ -1043,4 +1043,4 @@ AmountMustBePositive=Le montant doit être positif.
|
|||||||
ByStatus=Par statut
|
ByStatus=Par statut
|
||||||
InformationMessage=Information
|
InformationMessage=Information
|
||||||
ASAP=Dès que possible
|
ASAP=Dès que possible
|
||||||
|
ErrorReminderActionCommCreation=Erreur lors de la création de la notification de rappel de cet événement
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user