summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/save.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-07-25 11:48:50 +0000
committeralecpl <alec@alec.pl>2011-07-25 11:48:50 +0000
commit71e8cc3bce5053ca986a95ef119101d15317ddc6 (patch)
treefa40f9e958aa918939cafae5038cdc978dfd81ad /program/steps/addressbook/save.inc
parent0213f8d4dddf88b1a3eec91ff0f95832ebac3008 (diff)
- Fixed display name on contact lists
Diffstat (limited to 'program/steps/addressbook/save.inc')
-rw-r--r--program/steps/addressbook/save.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index a8dd38f27..393eb5145 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -188,8 +188,8 @@ if (!empty($cid))
$a_js_cols = array();
$record = $CONTACTS->get_record($newcid ? $newcid : $cid, true);
$record['email'] = reset($CONTACTS->get_col_values('email', $record, true));
- if (!$record['name'])
- $record['name'] = $record['email'];
+ if (empty($record['name']))
+ $record['name'] = rcube_addressbook::compose_display_name($record, true);
foreach (array('name', 'email') as $col)
$a_js_cols[] = Q((string)$record[$col]);