From 6898b420ed4eb2bd2d1933758cde27bdd305d72a Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 17 Sep 2012 19:47:33 +0200 Subject: Avoid saving composed FN values with only spaces (shows empty names in listing) --- program/include/rcube_addressbook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/include/rcube_addressbook.php b/program/include/rcube_addressbook.php index 069ea5715..f4f255322 100644 --- a/program/include/rcube_addressbook.php +++ b/program/include/rcube_addressbook.php @@ -465,7 +465,7 @@ abstract class rcube_addressbook $fn = $contact['name']; if (!$fn) // default display name composition according to vcard standard - $fn = join(' ', array_filter(array($contact['prefix'], $contact['firstname'], $contact['middlename'], $contact['surname'], $contact['suffix']))); + $fn = trim(join(' ', array_filter(array($contact['prefix'], $contact['firstname'], $contact['middlename'], $contact['surname'], $contact['suffix'])))); // use email address part for name $email = is_array($contact['email']) ? $contact['email'][0] : $contact['email']; -- cgit v1.2.3