diff options
Diffstat (limited to 'program/steps/addressbook')
-rw-r--r-- | program/steps/addressbook/func.inc | 8 | ||||
-rw-r--r-- | program/steps/addressbook/save.inc | 3 |
2 files changed, 3 insertions, 8 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index f6ce79ed1..f261527e4 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -347,13 +347,9 @@ function rcmail_js_contacts_list($result, $prefix='') // format each col foreach ($a_show_cols as $col) { - $val = $row[$col]; - if ($val == '' && $col == 'name') { - $val = rcube_addressbook::compose_display_name($row, true); - } - + $val = $col == 'name' ? rcube_addressbook::compose_list_name($row) : $row[$col]; $a_row_cols[$col] = Q($val); - } + } $OUTPUT->command($prefix.'add_contact_row', $row['ID'], $a_row_cols); } diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc index f584a0e6a..038b9057f 100644 --- a/program/steps/addressbook/save.inc +++ b/program/steps/addressbook/save.inc @@ -135,8 +135,7 @@ 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 (empty($record['name'])) - $record['name'] = rcube_addressbook::compose_display_name($record, true); + $record['name'] = rcube_addressbook::compose_list_name($record); foreach (array('name', 'email') as $col) $a_js_cols[] = Q((string)$record[$col]); |