Update actions_sendmails.inc.php
This commit is contained in:
parent
0280d0f5fe
commit
77d4107085
@ -416,22 +416,15 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($error)
|
// Redirect here
|
||||||
{
|
// This avoid sending mail twice if going out and then back to page
|
||||||
dol_print_error($db);
|
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2));
|
||||||
}
|
setEventMessages($mesg, null, 'mesgs');
|
||||||
else
|
|
||||||
{
|
|
||||||
// Redirect here
|
|
||||||
// This avoid sending mail twice if going out and then back to page
|
|
||||||
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2));
|
|
||||||
setEventMessages($mesg, null, 'mesgs');
|
|
||||||
|
|
||||||
$moreparam='';
|
$moreparam='';
|
||||||
if (isset($paramname2) || isset($paramval2)) $moreparam.= '&'.($paramname2?$paramname2:'mid').'='.$paramval2;
|
if (isset($paramname2) || isset($paramval2)) $moreparam.= '&'.($paramname2?$paramname2:'mid').'='.$paramval2;
|
||||||
header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.(is_object($object)?$object->id:'').$moreparam);
|
header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.(is_object($object)?$object->id:'').$moreparam);
|
||||||
exit;
|
exit;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user