From 4db226d48ee3e34826ed2fb93c340032ce92efc3 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 28 Oct 2008 20:38:46 +1300 Subject: [PATCH] Add the fetching of the permissions to the query, even if we don't apply them yet. --- inc/caldav-POST.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/caldav-POST.php b/inc/caldav-POST.php index d6d50f95..10a47721 100644 --- a/inc/caldav-POST.php +++ b/inc/caldav-POST.php @@ -77,7 +77,8 @@ function handle_freebusy_request( $ic ) { $busy_tentative = array(); $sql = "SELECT caldav_data.caldav_data, calendar_item.rrule, calendar_item.transp, calendar_item.status, "; $sql .= "to_char(calendar_item.dtstart at time zone 'GMT',".iCalendar::SqlDateFormat().") AS start, "; - $sql .= "to_char(calendar_item.dtend at time zone 'GMT',".iCalendar::SqlDateFormat().") AS finish "; + $sql .= "to_char(calendar_item.dtend at time zone 'GMT',".iCalendar::SqlDateFormat().") AS finish, "; + $sql .= "get_permissions($session->user_no,collection.user_no) AS permissions "; $sql .= "FROM usr INNER JOIN collection USING (user_no) INNER JOIN caldav_data USING (collection_id) INNER JOIN calendar_item USING(dav_id)".$where; if ( isset($c->strict_result_ordering) && $c->strict_result_ordering ) $sql .= " ORDER BY dav_id"; $qry = new PgQuery( $sql, $attendee_email );