Implode arrays when not exporting human-friendly values so they don't say 'Array'

This commit is contained in:
Nathan Gray 2010-12-15 23:06:36 +00:00
parent 4cb00a142d
commit acdb098a83

View File

@ -181,7 +181,13 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
$this->convert($contact, $options); $this->convert($contact, $options);
if($options['convert']) { if($options['convert']) {
importexport_export_csv::convert($contact, self::$types, 'addressbook'); importexport_export_csv::convert($contact, self::$types, 'addressbook');
} } else {
// Implode arrays, so they don't say 'Array'
foreach($contact->get_record_array() as $key => $value) {
if(is_array($value)) $contact->$key = implode(',', $value);
}
}
$export_object->export_record($contact); $export_object->export_record($contact);
unset($contact); unset($contact);
} }