From 0fb962fd6c8c4381d54a6e920aeafb19844084fa Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 18 Dec 2008 22:52:11 +1300 Subject: [PATCH] Fix bug in hide_alarm handling. --- inc/caldav-REPORT.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/inc/caldav-REPORT.php b/inc/caldav-REPORT.php index c9c6860e..c57ffa4b 100644 --- a/inc/caldav-REPORT.php +++ b/inc/caldav-REPORT.php @@ -102,13 +102,8 @@ function calendar_to_xml( $properties, $item ) { elseif ( isset($c->hide_alarm) && $c->hide_alarm ) { // Otherwise we hide the alarms (if configured to) $ical = new iCalComponent( $caldav_data ); - $timezones = $ical->GetComponents('VTIMEZONE',true); - $resources = $ical->GetComponents('VTIMEZONE',false); - foreach( $resources AS $k => $v ) { - $v->ClearComponents('VALARM'); - } - $ical->SetComponents($timezones + $resources); - $caldav_data = $ical->render(true, $caldav_type ); + $ical->ClearComponents( 'VALARM' ); + $caldav_data = $ical->Render(); } } }