From e848180aaa9640de871796ca1a3e4f8110701fd6 Mon Sep 17 00:00:00 2001 From: thomascube Date: Thu, 12 May 2011 20:18:19 +0000 Subject: Improve display name composition when saving contacts (#1487143), with plugin-support; allow empty names in sql address book, fall back to e-mail address in listing and vcard export --- program/steps/mail/addcontact.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'program/steps/mail') diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc index 03adcbe21..0baf6cd63 100644 --- a/program/steps/mail/addcontact.inc +++ b/program/steps/mail/addcontact.inc @@ -49,10 +49,7 @@ if (!empty($_POST['_address']) && is_object($CONTACTS)) } $contact['email'] = rcube_idn_to_utf8($contact['email']); - - // use email address part for name - if (empty($contact['name']) || $contact['name'] == $contact['email']) - $contact['name'] = ucfirst(preg_replace('/[\.\-]/', ' ', substr($contact['email'], 0, strpos($contact['email'], '@')))); + $contact['name'] = rcube_addressbook::compose_display_name($contact); // check for existing contacts $existing = $CONTACTS->search('email', $contact['email'], true, false); -- cgit v1.2.3