diff --git a/calendar/inc/class.bocalendar.inc.php b/calendar/inc/class.bocalendar.inc.php index eb23868df0..3b79ba4670 100755 --- a/calendar/inc/class.bocalendar.inc.php +++ b/calendar/inc/class.bocalendar.inc.php @@ -1697,7 +1697,6 @@ $icalendar->set_var($ical_event['uid'],'value','phpGW/'.$event['id']); $ical_event['priority'] = $event['priority']; $ical_event['class'] = intval($event['public']); -// $ical_event['class']['value'] = 1; $icalendar->set_var($ical_event['description'],'value',$event['title']); $icalendar->set_var($ical_event['summary'],'value',$event['description']); $dtstart_mktime = $this->maketime($event['start']) - $this->datetime->tz_offset; @@ -1733,9 +1732,70 @@ } } } - if(!$event['recur_type']) + if($event['recur_type']) { - + $str = ''; + switch($event['recur_type']) + { + case MCAL_RECUR_DAILY: + $str .= 'FREQ=DAILY'; + break; + case MCAL_RECUR_WEEKLY: + $str .= 'FREQ=WEEKLY'; + if($event['recur_data']) + { + $str .= ';BYDAY='; + for($i=1;$imaketime($event['recur_enddate']) - $this->datetime->tz_offset; + $str .= ';UNTIL='.date('Ymd\THis\Z',$recur_mktime); + } + $icalendar->parse_value($ical_event,'rrule',$str,'vevent'); } $ical_events[] = $ical_event; }