From 852497c4f6c147e0132918e56ee6d5fef5b501f1 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 10 Dec 2010 22:56:02 +0000 Subject: [PATCH] Implode arrays when not exporting human-friendly values so they don't say 'Array' --- resources/inc/class.resources_export_csv.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/inc/class.resources_export_csv.inc.php b/resources/inc/class.resources_export_csv.inc.php index ea837c8c6e..aa09fd3067 100644 --- a/resources/inc/class.resources_export_csv.inc.php +++ b/resources/inc/class.resources_export_csv.inc.php @@ -66,7 +66,13 @@ class resources_export_csv implements importexport_iface_export_plugin { $resource->set_record($record); if($options['convert']) { importexport_export_csv::convert($resource, $types, 'resources'); - } + } else { + // Implode arrays, so they don't say 'Array' + foreach($resource->get_record_array() as $key => $value) { + if(is_array($value)) $resource->$key = implode(',', $value); + } + } + $export_object->export_record($resource); unset($resource); }