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

This commit is contained in:
Nathan Gray 2010-12-10 22:56:02 +00:00
parent 0df9ee0c6d
commit 852497c4f6

View File

@ -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);
}