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