diff --git a/inc/caldav-REPORT-calquery.php b/inc/caldav-REPORT-calquery.php index a77f7e72..f33db985 100644 --- a/inc/caldav-REPORT-calquery.php +++ b/inc/caldav-REPORT-calquery.php @@ -1,5 +1,7 @@ Exec("calquery",__LINE__,__FILE__) && $qry->rows > 0 ) { while( $calendar_object = $qry->Fetch() ) { if ( !$need_post_filter || apply_filter( $qry_filters, $calendar_object ) ) { - if ( $need_expansion ) expand_event_instances($ics, $expand_range_start, $expand_range_end); + if ( $need_expansion ) { + $ics = new iCalComponent($calendar_object->caldav_data); + $expanded = expand_event_instances($ics, $expand_range_start, $expand_range_end); + $calendar_object->caldav_data = $expanded->Render(); + } $responses[] = calendar_to_xml( $properties, $calendar_object ); } }