Update actions_sendmails.inc.php

This commit is contained in:
Laurent Destailleur 2018-02-03 17:44:37 +01:00 committed by GitHub
parent 0280d0f5fe
commit 77d4107085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -416,22 +416,15 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
}
}
if ($error)
{
dol_print_error($db);
}
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');
// 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='';
if (isset($paramname2) || isset($paramval2)) $moreparam.= '&'.($paramname2?$paramname2:'mid').'='.$paramval2;
header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.(is_object($object)?$object->id:'').$moreparam);
exit;
}
}
else
{