mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:36 +01:00
* Mail: correctly quote name / personal part containing German umlauts or special chars when searching for email addresses in compose
This commit is contained in:
parent
db61f288d8
commit
41b60e9e12
@ -1461,7 +1461,7 @@ class addressbook_bo extends addressbook_so
|
||||
*/
|
||||
function link_query($pattern, Array &$options = array())
|
||||
{
|
||||
$filter = $result = $criteria = array();
|
||||
$result = $criteria = array();
|
||||
$limit = false;
|
||||
if ($pattern)
|
||||
{
|
||||
@ -1483,8 +1483,12 @@ class addressbook_bo extends addressbook_so
|
||||
$cfs = $this->read_customfields($ids);
|
||||
foreach($contacts as $contact)
|
||||
{
|
||||
$result[$contact['id']] = $this->link_title($contact+(array)$cfs[$contact['id']]).
|
||||
($options['type'] === 'email' ? ' <'.$contact['email'].'>' : '');
|
||||
$result[$contact['id']] = $this->link_title($contact+(array)$cfs[$contact['id']]);
|
||||
// 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']]);
|
||||
}
|
||||
// show category color
|
||||
if ($contact['cat_id'] && ($color = etemplate::cats2color($contact['cat_id'])))
|
||||
{
|
||||
|
@ -3294,7 +3294,7 @@ class mail_compose
|
||||
{
|
||||
$contact['n_fn'] = str_replace(array(',','@'),' ',$contact['n_fn']);
|
||||
}
|
||||
$completeMailString = trim($contact['n_fn'] ? $contact['n_fn'] : $contact['fn']) .' <'. trim($email) .'>';
|
||||
$completeMailString = imap_rfc822_write_address(trim($email), '', trim($contact['n_fn'] ? $contact['n_fn'] : $contact['fn']));
|
||||
if(!empty($email) && in_array($completeMailString ,$results) === false) {
|
||||
$results[] = array(
|
||||
'id'=>$completeMailString,
|
||||
@ -3315,7 +3315,7 @@ class mail_compose
|
||||
{
|
||||
$group = $GLOBALS['egw']->accounts->read($g_id);
|
||||
if(!$group['account_email']) continue;
|
||||
$completeMailString = trim($name) .' <'. trim($group['account_email']) .'>';
|
||||
$completeMailString = imap_rfc822_write_address(trim($group['account_email']), '', $name);
|
||||
$results[] = array(
|
||||
'id' => $completeMailString,
|
||||
'label' => $completeMailString,
|
||||
|
Loading…
Reference in New Issue
Block a user