|
|
@ -494,8 +494,11 @@ abstract class rcube_addressbook |
|
|
|
$contact = rcube::get_instance()->plugins->exec_hook('contact_displayname', $contact); |
|
|
|
$fn = $contact['name']; |
|
|
|
|
|
|
|
if (!$fn) // default display name composition according to vcard standard
|
|
|
|
$fn = trim(join(' ', array_filter(array($contact['prefix'], $contact['firstname'], $contact['middlename'], $contact['surname'], $contact['suffix'])))); |
|
|
|
// default display name composition according to vcard standard
|
|
|
|
if (!$fn) { |
|
|
|
$fn = join(' ', array_filter(array($contact['prefix'], $contact['firstname'], $contact['middlename'], $contact['surname'], $contact['suffix']))); |
|
|
|
$fn = trim(preg_replace('/\s+/', ' ', $fn)); |
|
|
|
} |
|
|
|
|
|
|
|
// use email address part for name
|
|
|
|
$email = self::get_col_values('email', $contact, true); |
|
|
@ -544,6 +547,7 @@ abstract class rcube_addressbook |
|
|
|
} |
|
|
|
|
|
|
|
$fn = trim($fn, ', '); |
|
|
|
$fn = preg_replace('/\s+/', ' ', $fn); |
|
|
|
|
|
|
|
// fallbacks...
|
|
|
|
if ($fn === '') { |
|
|
|