From 2fc154bea6e50ec8e1827189ecc61aae614be3b2 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 6 Jun 2007 23:42:14 +1200 Subject: [PATCH] Minor code tidyups. --- inc/caldav-REPORT.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/inc/caldav-REPORT.php b/inc/caldav-REPORT.php index 54a31d8a..3a6fc234 100644 --- a/inc/caldav-REPORT.php +++ b/inc/caldav-REPORT.php @@ -25,13 +25,7 @@ if ( !isset($request->xml_tags) ) { $request->DoResponse( 403, "REPORT body contains no XML data!" ); } -require_once("XMLElement.php"); require_once("iCalendar.php"); -/** -* Free/Busy is different to the other responses (not XML) so we -* deal with it separately -*/ -$free_busy_query = false; $reportnum = -1; $report = array(); @@ -45,7 +39,11 @@ if ( $xmltree->GetTag() == "URN:IETF:PARAMS:XML:NS:CALDAV:FREE-BUSY-QUERY" ) { } // Must have read privilege for all other reports -if ( ! ($request->AllowedTo('read') ) ) $request->DoResponse( 404, translate("You may not access that calendar") ); +if ( ! ($request->AllowedTo('read') ) ) { + // If they got this far they *do* have freebusy access, so can know the + // calendar really exists. Informing them is therefore OK. + $request->DoResponse( 404, translate("You may not access that calendar") ); +} /**