From f444efbc9a0d14e02472a5f4accc24fea5ad8b49 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 10 Dec 2010 22:47:44 +0000 Subject: [PATCH] Implode arrays when not exporting human-friendly values so they don't say 'Array' --- .../inc/class.addressbook_export_contacts_csv.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php index b061fc5745..8c26b6df00 100644 --- a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php @@ -181,7 +181,13 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi $this->convert($contact, $options); if($options['convert']) { 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); unset($contact); }