From 160d87f5d29e077e8003168afa24445ccdaafb9d Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 20 Oct 2011 12:21:42 +1300 Subject: [PATCH] PROPPATCH response should contain a propstat clause. --- inc/caldav-PROPPATCH.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/inc/caldav-PROPPATCH.php b/inc/caldav-PROPPATCH.php index 890819b0..80d301a6 100644 --- a/inc/caldav-PROPPATCH.php +++ b/inc/caldav-PROPPATCH.php @@ -334,7 +334,18 @@ if ( $qry->Commit() ) { $href = new XMLElement('href', $url ); $desc = new XMLElement('responsedescription', translate("All requested changes were made.") ); - $multistatus = new XMLElement( "multistatus", new XMLElement( 'response', array( $href, $desc ) ), array('xmlns'=>'DAV:') ); + $propstat = array(); + foreach( $success AS $tag => $v ) { + $propstat[] = new XMLElement( 'propstat', array( + new XMLElement( 'prop', new XMLElement($tag)), + new XMLElement( 'status', 'HTTP/1.1 200 OK' ), + )); + } + + $url = ConstructURL($request->path); + array_unshift( $failure, new XMLElement('href', $url ) ); + + $multistatus = new XMLElement( "multistatus", new XMLElement( 'response', array( $href, $propstat, $desc ) ), array('xmlns'=>'DAV:') ); $request->DoResponse( 200, $multistatus->Render(0,''), 'text/xml; charset="utf-8"' ); }