forked from extern/egroupware
fix for imap_rfc822_write_address from imap extension
This commit is contained in:
parent
4c19e714bb
commit
968869e65d
@ -1487,7 +1487,9 @@ class addressbook_bo extends addressbook_so
|
||||
// make sure to return a correctly quoted rfc822 address, if requested
|
||||
if ($options['type'] === 'email')
|
||||
{
|
||||
$result[$contact['id']] = imap_rfc822_write_address($contact['email'], '', $result[$contact['id']]);
|
||||
$args = explode('@', $contact['email']);
|
||||
$args[] = $result[$contact['id']];
|
||||
$result[$contact['id']] = call_user_func_array('imap_rfc822_write_address', $args);
|
||||
}
|
||||
// show category color
|
||||
if ($contact['cat_id'] && ($color = etemplate::cats2color($contact['cat_id'])))
|
||||
|
@ -3294,7 +3294,9 @@ class mail_compose
|
||||
{
|
||||
$contact['n_fn'] = str_replace(array(',','@'),' ',$contact['n_fn']);
|
||||
}
|
||||
$completeMailString = imap_rfc822_write_address(trim($email), '', trim($contact['n_fn'] ? $contact['n_fn'] : $contact['fn']));
|
||||
$args = explode('@', trim($email));
|
||||
$args[] = trim($contact['n_fn'] ? $contact['n_fn'] : $contact['fn']);
|
||||
$completeMailString = call_user_func_array('imap_rfc822_write_address', $args);
|
||||
if(!empty($email) && in_array($completeMailString ,$results) === false) {
|
||||
$results[] = array(
|
||||
'id'=>$completeMailString,
|
||||
@ -3315,7 +3317,9 @@ class mail_compose
|
||||
{
|
||||
$group = $GLOBALS['egw']->accounts->read($g_id);
|
||||
if(!$group['account_email']) continue;
|
||||
$completeMailString = imap_rfc822_write_address(trim($group['account_email']), '', $name);
|
||||
$args = explode('@', trim($group['account_email']));
|
||||
$args[] = $name;
|
||||
$completeMailString = call_user_func_array('imap_rfc822_write_address', $args);
|
||||
$results[] = array(
|
||||
'id' => $completeMailString,
|
||||
'label' => $completeMailString,
|
||||
|
Loading…
Reference in New Issue
Block a user