diff --git a/calendar/inc/class.calendar_merge.inc.php b/calendar/inc/class.calendar_merge.inc.php index 4652e34361..908786855d 100644 --- a/calendar/inc/class.calendar_merge.inc.php +++ b/calendar/inc/class.calendar_merge.inc.php @@ -138,7 +138,7 @@ class calendar_merge extends bo_merge } } // Handle merging a range of events into a document with pagerepeat instead of range - else if ((strpos($content, '$$pagerepeat') !== false || strpos($content, '{{pagerepeat') !== false) && is_array($ids) && $ids[0] && !$id[0]['id']) + else if ((strpos($content, '$$pagerepeat') !== false || strpos($content, '{{pagerepeat') !== false) && is_array($ids) && $ids[0] && !$ids[0]['id']) { // Passed a range, needs to be expanded $events = $this->bo->search($this->query + $ids[0] + array( @@ -152,7 +152,7 @@ class calendar_merge extends bo_merge $ids[] = $event; } } - + return parent::merge_string($content, $ids, $err, $mimetype,$fix); } diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index 5abdf1791e..c3d14806cf 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -623,9 +623,10 @@ class calendar_ui if($content['last']) { $this->last = new egw_time($content['last']); - $this->last->setTime(23, 59, 59); - $this->last = $this->last->format('ts'); } + $this->last->setTime(23, 59, 59); + $this->last = $this->last->format('ts'); + $_GET['merge'] = $content['merge']; $this->merge(); return; @@ -841,6 +842,7 @@ class calendar_ui )); } $merge = new calendar_merge(); + //error_log('Timespan: ' . egw_time::to($timespan[0]['start']) . ' - ' . egw_time::to($timespan[0]['end'])); $error = $merge->download($_GET['merge'], $timespan, '', $GLOBALS['egw_info']['user']['preferences']['calendar']['document_dir']); // Here? Doesn't actually give the message egw_framework::refresh_opener($error, 'calendar');