From b1256ecb6e2d0cff155ffcd53a954837b5cf7107 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 5 May 2012 22:57:43 +1200 Subject: [PATCH] When a bind is made to an existing bind, bind to the target of that. --- inc/caldav-BIND.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/caldav-BIND.php b/inc/caldav-BIND.php index d93a7fa9..bd7876c3 100644 --- a/inc/caldav-BIND.php +++ b/inc/caldav-BIND.php @@ -98,7 +98,11 @@ else { if ( $source->IsPrincipal() || !$source->IsCollection() ) { $request->PreconditionFailed(403,'DAV::binding-allowed',translate('DAViCal only allows BIND requests for collections at present.')); } - + + if ( $source->IsBinding() ) + $source = new DAVResource( $source->bound_from() ); + + /* bind_id INT8 DEFAULT nextval('dav_id_seq') PRIMARY KEY, bound_source_id INT8 REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE,