From e9087397653fbbd6d02e0fa4bda81b59eb269a21 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sun, 8 Jul 2012 21:44:41 +1200 Subject: [PATCH] Reports should report on the item path, not the collection path. --- inc/caldav-REPORT.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/caldav-REPORT.php b/inc/caldav-REPORT.php index ffe14432..13f779ae 100644 --- a/inc/caldav-REPORT.php +++ b/inc/caldav-REPORT.php @@ -129,7 +129,7 @@ function component_to_xml( $properties, $item ) { } if ( isset($c->hide_alarm) && $c->hide_alarm ) { - $dav_resource = new DAVResource($request->path); + $dav_resource = new DAVResource($item->path); if ( isset($properties['calendar-data']) && !$dav_resource->HavePrivilegeTo('write') ) { dbg_error_log("REPORT","Stripping event alarms for: %s", $item->dav_name ); $vcal = new vCalendar($caldav_data); @@ -187,7 +187,7 @@ function component_to_xml( $properties, $item ) { } $href = new XMLElement("href", $url ); if ( $need_resource ) { - if ( !isset($dav_resource) ) $dav_resource = new DAVResource($request->path); + if ( !isset($dav_resource) ) $dav_resource = new DAVResource($item->path); $elements = $dav_resource->GetPropStat(array_keys($properties), $reply); array_unshift($elements, $href); }