Contacts: Fix adding N property in getContactVCard
This commit is contained in:
parent
facd4cbe17
commit
6bd0aad117
1 changed files with 1 additions and 1 deletions
|
@ -91,11 +91,11 @@ class OC_Contacts_App {
|
|||
if($vcard->__isset('FN')) {
|
||||
OC_Log::write('contacts','getContactVCard, found FN field: '.$vcard->__get('FN'), OC_Log::DEBUG);
|
||||
$n = implode(';', array_reverse(array_slice(explode(' ', $vcard->__get('FN')), 0, 2))).';;;';
|
||||
$vcard->setString('N', $n);
|
||||
OC_Contacts_VCard::edit( $id, $vcard->serialize());
|
||||
} else { // Else just add an empty 'N' field :-P
|
||||
$vcard->setString('N', 'Unknown;Name;;;');
|
||||
}
|
||||
$vcard->setString('N', $n);
|
||||
}
|
||||
return $vcard;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue