summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-05-12 20:18:19 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-05-12 20:18:19 +0000
commit0060963927d992e06410aad4bf088b246f970a04 (patch)
treeed4fd9bc466a12e6a6e0e81906c4426ed335e032 /roundcubemail/program/steps/mail
parent61d95b9ca704b8306c99febb363fb0df8b1748d1 (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
git-svn-id: https://svn.roundcube.net/trunk@4752 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
-rw-r--r--roundcubemail/program/steps/mail/addcontact.inc5
1 files changed, 1 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/mail/addcontact.inc b/roundcubemail/program/steps/mail/addcontact.inc
index 03adcbe21..0baf6cd63 100644
--- a/roundcubemail/program/steps/mail/addcontact.inc
+++ b/roundcubemail/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);