FIX user param is null not 0 when not defined

FIX properties email_xx were not set
This commit is contained in:
Laurent Destailleur
2018-11-12 15:27:59 +01:00
parent 5a7cb95b72
commit 01e7b5747d
4 changed files with 218 additions and 40 deletions

View File

@@ -427,8 +427,9 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$object->socid = $sendtosocid; // To link to a company
$object->sendtoid = $sendtoid; // To link to contact addresses. This is an array.
$object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
$object->actionmsg = $actionmsg; // Long text
$object->actionmsg2 = $actionmsg2; // Short text
$object->actionmsg = $actionmsg; // Long text (@TODO Replace this with $message, we already have details of email in dedicated properties)
$object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentBy')...);
$object->trackid = $trackid;
$object->fk_element = $object->id;
$object->elementtype = $object->element;
@@ -439,9 +440,14 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$object->sendtouserid = $sendtouserid;
}
// TODO Set object->email_xxx properties
$object->email_msgid = $mailfile->msgid; // @TODO Set msgid into $mailfile after sending
$object->email_from = $from;
$object->email_subject = $subject;
$object->email_to = $sendto;
$object->email_tocc = $sendtocc;
$object->email_tobcc = $sendtobcc;
$object->email_subject = $subject;
$object->email_msgid = $mailfile->msgid;
//...
// Call of triggers
if (! empty($trigger_name))