From 4a72ff16a37fe8c9fc641cf87932ef4f9ff3660b Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 17 May 2011 00:21:08 +1200 Subject: [PATCH] Respond with 5.3; no Scheduling Support for user rather than 3.7 Also allow for this response when someone manually disables the scheduling extensions support. --- inc/caldav-PUT-functions.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index 4ef791d9..aba25574 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -193,11 +193,18 @@ function handle_schedule_request( $ical ) { continue; } + if ( isset($c->enable_auto_schedule) && !$c->enable_auto_schedule ) { + // In this case we're being asked not to do auto-scheduling, so we build + // a response back for the client saying we can't... + $attendee->SetParameterValue ('SCHEDULE-STATUS','5.3;No scheduling support for user'); + continue; + } + dbg_error_log( "POST", "Delivering to %s", $attendee_email ); $attendee_principal = new DAVPrincipal ( array ('email'=>$attendee_email, 'options'=> array ( 'allow_by_email' => true ) ) ); if ( $attendee_principal == false ){ - $attendee->SetParameterValue ('SCHEDULE-STATUS','3.7;Invalid Calendar User'); + $attendee->SetParameterValue ('SCHEDULE-STATUS','5.3;No scheduling support for user'); continue; } $deliver_path = $attendee_principal->internal_url('schedule_inbox');