diff options
author | thomascube <thomas@roundcube.net> | 2011-05-12 20:18:19 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-05-12 20:18:19 +0000 |
commit | e848180aaa9640de871796ca1a3e4f8110701fd6 (patch) | |
tree | 8691c816c9c8ddd4ad8ef733cc61a8bc52541cc3 /program/steps/mail | |
parent | caedd52361f8ba15aa6bfbc00cab7f55525f5edf (diff) |
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
Diffstat (limited to 'program/steps/mail')
-rw-r--r-- | program/steps/mail/addcontact.inc | 5 |
1 files changed, 1 insertions, 4 deletions
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); |