From 5a81f0370a8e2d7e3c9f89c50343050cf04e8677 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 18 Mar 2009 14:35:21 +1300 Subject: [PATCH] Correct errors in GET for confidential events. --- inc/caldav-GET.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/caldav-GET.php b/inc/caldav-GET.php index 9555f011..824c2464 100644 --- a/inc/caldav-GET.php +++ b/inc/caldav-GET.php @@ -50,7 +50,7 @@ else if ( $qry->rows == 1 && ! $request->IsCollection() ) { if ( $event->class == 'CONFIDENTIAL' && ! $request->AllowedTo('modify') ) { // if the event is confidential we fake one that just says "Busy" $confidential = new iCalComponent(); - $confidential->SetType($first->GetType()); + $confidential->SetType($event->caldav_type); $confidential->AddProperty( 'SUMMARY', translate('Busy') ); $confidential->AddProperty( 'CLASS', 'CONFIDENTIAL' ); $confidential->SetProperties( $first->GetProperties('DTSTART'), 'DTSTART' ); @@ -130,13 +130,13 @@ else { if ( $event->class == 'CONFIDENTIAL' ) { // if the event is confidential we fake one that just says "Busy" $confidential = new iCalComponent(); - $confidential->SetType($first->GetType()); + $confidential->SetType($resource->GetType()); $confidential->AddProperty( 'SUMMARY', translate('Busy') ); $confidential->AddProperty( 'CLASS', 'CONFIDENTIAL' ); - $confidential->SetProperties( $first->GetProperties('DTSTART'), 'DTSTART' ); - $confidential->SetProperties( $first->GetProperties('RRULE'), 'RRULE' ); - $confidential->SetProperties( $first->GetProperties('DURATION'), 'DURATION' ); - $confidential->SetProperties( $first->GetProperties('DTEND'), 'DTEND' ); + $confidential->SetProperties( $resource->GetProperties('DTSTART'), 'DTSTART' ); + $confidential->SetProperties( $resource->GetProperties('RRULE'), 'RRULE' ); + $confidential->SetProperties( $resource->GetProperties('DURATION'), 'DURATION' ); + $confidential->SetProperties( $resource->GetProperties('DTEND'), 'DTEND' ); $vcal->AddComponent($confidential); }