Avoid saving composed FN values with only spaces (shows empty names in listing)

pull/31/head
Thomas Bruederli 12 years ago
parent 3e2a06c683
commit 68a9ff15f2

@ -482,7 +482,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'];

Loading…
Cancel
Save