diff options
author | thomascube <thomas@roundcube.net> | 2012-02-11 13:50:04 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2012-02-11 13:50:04 +0000 |
commit | 4dc22dd63417d6043489898d6ff9ac551c1b4231 (patch) | |
tree | 56941762ef893dc134882b32671dc47f0ab5c1ad /program/steps/mail/addcontact.inc | |
parent | ba36dd03f6f7005a6e35ec02e4ff9a58f95be1c3 (diff) |
Backported r5871 to 0.7 release branch
Diffstat (limited to 'program/steps/mail/addcontact.inc')
-rw-r--r-- | program/steps/mail/addcontact.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc index a4feb7b58..ca8d66c9d 100644 --- a/program/steps/mail/addcontact.inc +++ b/program/steps/mail/addcontact.inc @@ -58,7 +58,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)) { |