diff --git a/calendar/inc/class.calendar_egw_record.inc.php b/calendar/inc/class.calendar_egw_record.inc.php index f52c96f65f..757255a623 100644 --- a/calendar/inc/class.calendar_egw_record.inc.php +++ b/calendar/inc/class.calendar_egw_record.inc.php @@ -44,7 +44,7 @@ class calendar_egw_record implements importexport_iface_egw_record * @param string $_attribute_name */ public function __get($_attribute_name) { - + return $this->record[$_attribute_name]; } /** @@ -54,7 +54,7 @@ class calendar_egw_record implements importexport_iface_egw_record * @param data $data */ public function __set($_attribute_name, $data) { - + $this->record[$_attribute_name] = $data; } /** diff --git a/calendar/inc/class.calendar_export_csv.inc.php b/calendar/inc/class.calendar_export_csv.inc.php index 9ad98d4a1e..85d9b46c0d 100644 --- a/calendar/inc/class.calendar_export_csv.inc.php +++ b/calendar/inc/class.calendar_export_csv.inc.php @@ -36,12 +36,23 @@ class calendar_export_csv implements importexport_iface_export_plugin { $export_object = new importexport_export_csv($_stream, (array)$options); $export_object->set_mapping($options['mapping']); + $convert_fields = importexport_export_csv::$types; + $convert_fields['date-time'][] = 'start'; + $convert_fields['date-time'][] = 'end'; + // $options['selection'] is array of identifiers as this plugin doesn't // support other selectors atm. $record = new calendar_egw_record(); foreach ($events as $event) { + // Add in participants + if($options['mapping']['participants']) { + $event['participants'] = implode(", ",$this->bo->participants($event,true)); + } + $record->set_record($event); + // Standard stuff + importexport_export_csv::convert($record, $convert_fields, 'calendar'); $export_object->export_record($record); } unset($record);