summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/addcontact.inc
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-02-11 11:28:58 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-02-11 11:28:58 +0000
commit220e993edcdcf9e5c4e3b8a1bacf9ac55468295b (patch)
treec26b1a2bdab7f4668e20f0e8d2e9bdacae51f60a /roundcubemail/program/steps/mail/addcontact.inc
parent2f3bfecc096508226f66eaa152c65087c31ec9fe (diff)
User configurable setting how to display contact names in list
git-svn-id: https://svn.roundcube.net/trunk@5871 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/addcontact.inc')
-rw-r--r--roundcubemail/program/steps/mail/addcontact.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/roundcubemail/program/steps/mail/addcontact.inc b/roundcubemail/program/steps/mail/addcontact.inc
index 8e11272e0..74768116e 100644
--- a/roundcubemail/program/steps/mail/addcontact.inc
+++ b/roundcubemail/program/steps/mail/addcontact.inc
@@ -61,7 +61,10 @@ if (!empty($_POST['_address']) && is_object($CONTACTS))
}
$contact['email'] = rcube_idn_to_utf8($contact['email']);
- $contact['name'] = rcube_addressbook::compose_display_name($contact);
+ $contact = $RCMAIL->plugins->exec_hook('contact_displayname', $contact);
+
+ if (empty($contact['firstname']) || empty($contact['surname']))
+ $contact['name'] = rcube_addressbook::compose_display_name($contact);
// validate contact record
if (!$CONTACTS->validate($contact, true)) {