Fix for extra photo key needed in two places

This commit is contained in:
Nathan Gray 2011-03-21 18:14:25 +00:00
parent 63824121d8
commit 9daa7bc069

View File

@ -119,6 +119,12 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
// Check records to see if additional fields are actually used // Check records to see if additional fields are actually used
foreach ($selection as $_contact) { foreach ($selection as $_contact) {
if(is_array($_contact) && array_key_exists('photo', $_contact)) {
unset($_contact['photo']);
}
if(is_array($_contact) && count($_contact) == 1 && $_contact['id']) {
$_contact = $_contact['id'];
}
if(is_array($_contact) && $_contact['id']) { if(is_array($_contact) && $_contact['id']) {
$contact = new addressbook_egw_record(); $contact = new addressbook_egw_record();
$contact->set_record($_contact); $contact->set_record($_contact);