From 70b760fbea1fd8bb3eae3dc8fa4bc3ae4ca5c99d Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sun, 14 Jun 2009 11:24:23 +1200 Subject: [PATCH] Simplify logic slightly. --- inc/caldav-PROPFIND.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/caldav-PROPFIND.php b/inc/caldav-PROPFIND.php index 06c6793e..c77c61b5 100644 --- a/inc/caldav-PROPFIND.php +++ b/inc/caldav-PROPFIND.php @@ -481,16 +481,16 @@ function collection_to_xml( $collection ) { } if ( isset($prop_list['urn:ietf:params:xml:ns:caldav:calendar-free-busy-set'] ) ) { - if ( $collection->type == 'in' && $session->user_no == $collection->user_no ) { + if ( $session->user_no != $collection->user_no ) { + $reply->CalDAVElement( $denied, "calendar-free-busy-set"); + } + else if ( $collection->type == 'in' ) { $fb_set = array(); foreach( $request->principal->calendar_free_busy_set AS $k => $v ) { $fb_set[] = $reply->href( $v, false, "DAV:" ); } $reply->CalDAVElement( $prop, "calendar-free-busy-set", $fb_set ); } - else if ( $session->user_no != $collection->user_no ) { - $reply->CalDAVElement( $denied, "calendar-free-busy-set"); - } } /**