From 68d42aeb2690f62503732f8fd59a5a680305aaea Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Fri, 20 Mar 2009 13:08:10 +1300 Subject: [PATCH] Fix from Markus Warg for handling of confidential events. --- inc/caldav-GET.php | 8 ++++---- inc/caldav-REPORT.php | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/inc/caldav-GET.php b/inc/caldav-GET.php index f30b635b..93f42c98 100644 --- a/inc/caldav-GET.php +++ b/inc/caldav-GET.php @@ -62,11 +62,10 @@ else if ( $qry->rows == 1 && ! $request->IsCollection() ) { $confidential->SetProperties( $first->GetProperties('RRULE'), 'RRULE' ); $confidential->SetProperties( $first->GetProperties('DURATION'), 'DURATION' ); $confidential->SetProperties( $first->GetProperties('DTEND'), 'DTEND' ); + $confidential->SetProperties( $first->GetProperties('UID'), 'UID' ); - $vcal = new iCalComponent(); - $vcal->VCalendar(); - $vcal->AddComponent($confidential); - $event->caldav_data = $vcal->Render(); + $ical->SetComponents( array($confidential), $confidential->GetType() ); + $event->caldav_data = $ical->Render(); $allowed = true; } else { @@ -142,6 +141,7 @@ else { $confidential->SetProperties( $resource->GetProperties('RRULE'), 'RRULE' ); $confidential->SetProperties( $resource->GetProperties('DURATION'), 'DURATION' ); $confidential->SetProperties( $resource->GetProperties('DTEND'), 'DTEND' ); + $confidential->SetProperties( $resource->GetProperties('UID'), 'UID' ); $vcal->AddComponent($confidential); } diff --git a/inc/caldav-REPORT.php b/inc/caldav-REPORT.php index ac0a9583..94d162cc 100644 --- a/inc/caldav-REPORT.php +++ b/inc/caldav-REPORT.php @@ -95,6 +95,7 @@ function calendar_to_xml( $properties, $item ) { $confidential->SetProperties( $first->GetProperties('RRULE'), 'RRULE' ); $confidential->SetProperties( $first->GetProperties('DURATION'), 'DURATION' ); $confidential->SetProperties( $first->GetProperties('DTEND'), 'DTEND' ); + $confidential->SetProperties( $first->GetProperties('UID'), 'UID' ); $ical->SetComponents(array($confidential),$confidential->GetType()); $caldav_data = $ical->Render();