Addressbook: Fix exporting accounts to CSV only had account_lid

This commit is contained in:
nathan 2024-11-28 11:45:08 -07:00
parent 10ccf19207
commit 303155110f

View File

@ -194,7 +194,9 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
if(is_array($_contact) && array_key_exists('photo', $_contact)) {
unset($_contact['photo']);
}
if(is_array($_contact) && count($_contact) == 1 && $_contact['id']) {
// Contacts->search() does not respect only_keys, so may return a partial contact array
if(is_array($_contact) && $_contact['id'])
{
$_contact = $_contact['id'];
}
if(is_array($_contact) && $_contact['id']) {
@ -272,7 +274,9 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
if(is_array($_contact) && array_key_exists('photo', $_contact)) {
unset($_contact['photo']);
}
if(is_array($_contact) && count($_contact) == 1 && $_contact['id']) {
// Contacts search does not respect only_keys
if(is_array($_contact) && $_contact['id'])
{
$_contact = $_contact['id'];
}
if(is_array($_contact) && $_contact['id']) {