mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
-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:
parent
059395d1e0
commit
e38dca3436
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user