summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/func.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/func.inc
parent0213f8d4dddf88b1a3eec91ff0f95832ebac3008 (diff)
- Fixed display name on contact lists
Diffstat (limited to 'program/steps/addressbook/func.inc')
-rw-r--r--program/steps/addressbook/func.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index f372c1c33..6b3ebad08 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -294,8 +294,13 @@ function rcmail_js_contacts_list($result, $prefix='')
}
// format each col
- foreach ($a_show_cols as $col)
- $a_row_cols[$col] = Q($row[$col]);
+ foreach ($a_show_cols as $col) {
+ $val = $row[$col];
+ if ($val == '' && $col == 'name') {
+ $val = rcube_addressbook::compose_display_name($row, true);
+ }
+ $a_row_cols[$col] = Q($val);
+ }
$OUTPUT->command($prefix.'add_contact_row', $row['ID'], $a_row_cols);
}