summaryrefslogtreecommitdiff
path: root/program/steps/mail/addcontact.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-02-11 11:28:58 +0000
committerthomascube <thomas@roundcube.net>2012-02-11 11:28:58 +0000
commitf9a967763e2a4cc595b44f40ac1ca666b2a02af6 (patch)
treeacf8a043fe90dbe860888402f718608eaaee8344 /program/steps/mail/addcontact.inc
parentd3ec72522b44e3c8d5ff29edecde866a9199f921 (diff)
User configurable setting how to display contact names in list
Diffstat (limited to 'program/steps/mail/addcontact.inc')
-rw-r--r--program/steps/mail/addcontact.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc
index 8e11272e0..74768116e 100644
--- a/program/steps/mail/addcontact.inc
+++ b/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)) {