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

- Add standard conversion for human-friendly values
This commit is contained in:
Nathan Gray 2010-12-10 22:51:53 +00:00
parent 059395d1e0
commit e38dca3436

View File

@ -38,9 +38,17 @@ class timesheet_export_csv implements importexport_iface_export_plugin {
// $options['selection'] is array of identifiers as this plugin doesn't
// support other selectors atm.
foreach ($selection as $identifier) {
$timesheetentry = new timesheet_egw_record($identifier);
$export_object->export_record($timesheetentry);
unset($timesheetentry);
$record = new timesheet_egw_record($identifier);
if($options['convert']) {
importexport_export_csv::convert($record, self::$types, 'timesheet');
} else {
// Implode arrays, so they don't say 'Array'
foreach($record->get_record_array() as $key => $value) {
if(is_array($value)) $record->$key = implode(',', $value);
}
}
$export_object->export_record($record);
unset($record);
}
}