Merge pull request #10993 from altatof/presend

NEW : use outputlangs in fullname construction for emails
This commit is contained in:
Laurent Destailleur 2019-04-11 16:33:07 +02:00 committed by GitHub
commit 7db0c0c705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,7 @@ if ($action == 'presend')
{
$fuser = new User($db);
$fuser->fetch($object->fk_user_author);
$liste['thirdparty'] = $fuser->getFullName($langs)." <".$fuser->email.">";
$liste['thirdparty'] = $fuser->getFullName($outputlangs)." <".$fuser->email.">";
}
elseif ($object->element == 'societe')
{
@ -155,11 +155,11 @@ if ($action == 'presend')
}
elseif ($object->element == 'contact')
{
$liste['contact'] = $object->getFullName($langs)." <".$object->email.">";
$liste['contact'] = $object->getFullName($outputlangs)." <".$object->email.">";
}
elseif ($object->element == 'user' || $object->element == 'member')
{
$liste['thirdparty'] = $object->getFullName($langs)." <".$object->email.">";
$liste['thirdparty'] = $object->getFullName($outputlangs)." <".$object->email.">";
}
else
{
@ -221,7 +221,7 @@ if ($action == 'presend')
foreach ($contactarr as $contact) {
$contactstatic->fetch($contact['id']);
$substitutionarray['__CONTACT_NAME_'.$contact['code'].'__'] = $contactstatic->getFullName($langs, 1);
$substitutionarray['__CONTACT_NAME_'.$contact['code'].'__'] = $contactstatic->getFullName($outputlangs, 1);
}
}