mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 23:29:31 +01:00
Convert recurrence type and interval to human friendly values
This commit is contained in:
parent
b95d81a521
commit
163ca54a1e
@ -31,15 +31,16 @@ class calendar_export_csv implements importexport_iface_export_plugin {
|
||||
'enum_recuring' => false,
|
||||
'daywise' => false,
|
||||
'owner' => $options['owner'],
|
||||
'date_format' => $options['date_format'],
|
||||
));
|
||||
|
||||
$export_object = new importexport_export_csv($_stream, (array)$options);
|
||||
$export_object->set_mapping($options['mapping']);
|
||||
$convert_fields = importexport_export_csv::$types;
|
||||
$convert_fields['select-account'][] = 'owner';
|
||||
$convert_fields['date-time'][] = 'start';
|
||||
$convert_fields['date-time'][] = 'end';
|
||||
|
||||
$recurrence = $this->bo->recur_types;
|
||||
|
||||
// $options['selection'] is array of identifiers as this plugin doesn't
|
||||
// support other selectors atm.
|
||||
@ -51,8 +52,14 @@ class calendar_export_csv implements importexport_iface_export_plugin {
|
||||
}
|
||||
|
||||
$record->set_record($event);
|
||||
if($options['mapping']['recurrence']) {
|
||||
$record->recurrence = $recurrence[$record->recur_type];
|
||||
if($record->recur_type != MCAL_RECUR_NONE) $record->recurrence .= ' / '. $record->recur_interval;
|
||||
}
|
||||
|
||||
// Standard stuff
|
||||
importexport_export_csv::convert($record, $convert_fields, 'calendar');
|
||||
|
||||
$export_object->export_record($record);
|
||||
}
|
||||
unset($record);
|
||||
|
Loading…
Reference in New Issue
Block a user