Merge pull request #10993 from altatof/presend
NEW : use outputlangs in fullname construction for emails
This commit is contained in:
commit
7db0c0c705
@ -145,7 +145,7 @@ if ($action == 'presend')
|
|||||||
{
|
{
|
||||||
$fuser = new User($db);
|
$fuser = new User($db);
|
||||||
$fuser->fetch($object->fk_user_author);
|
$fuser->fetch($object->fk_user_author);
|
||||||
$liste['thirdparty'] = $fuser->getFullName($langs)." <".$fuser->email.">";
|
$liste['thirdparty'] = $fuser->getFullName($outputlangs)." <".$fuser->email.">";
|
||||||
}
|
}
|
||||||
elseif ($object->element == 'societe')
|
elseif ($object->element == 'societe')
|
||||||
{
|
{
|
||||||
@ -155,11 +155,11 @@ if ($action == 'presend')
|
|||||||
}
|
}
|
||||||
elseif ($object->element == 'contact')
|
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')
|
elseif ($object->element == 'user' || $object->element == 'member')
|
||||||
{
|
{
|
||||||
$liste['thirdparty'] = $object->getFullName($langs)." <".$object->email.">";
|
$liste['thirdparty'] = $object->getFullName($outputlangs)." <".$object->email.">";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -221,7 +221,7 @@ if ($action == 'presend')
|
|||||||
|
|
||||||
foreach ($contactarr as $contact) {
|
foreach ($contactarr as $contact) {
|
||||||
$contactstatic->fetch($contact['id']);
|
$contactstatic->fetch($contact['id']);
|
||||||
$substitutionarray['__CONTACT_NAME_'.$contact['code'].'__'] = $contactstatic->getFullName($langs, 1);
|
$substitutionarray['__CONTACT_NAME_'.$contact['code'].'__'] = $contactstatic->getFullName($outputlangs, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user