diff --git a/dba/caldav_functions.sql b/dba/caldav_functions.sql index fe7535e1..717e5f73 100644 --- a/dba/caldav_functions.sql +++ b/dba/caldav_functions.sql @@ -207,7 +207,7 @@ DECLARE BEGIN -- Self can always have full access IF in_from = in_to THEN - RETURN ''RW''; + RETURN ''A''; END IF; -- dbg := ''S-''; diff --git a/htdocs/caldav.php b/htdocs/caldav.php index 50e6e8f7..d3d0943b 100644 --- a/htdocs/caldav.php +++ b/htdocs/caldav.php @@ -12,115 +12,10 @@ require_once("always.php"); dbg_error_log( "caldav", " User agent: %s", ((isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "Unfortunately Mulberry and Chandler don't send a 'User-agent' header with their requests :-(")) ); require_once("BasicAuthSession.php"); -$raw_headers = apache_request_headers(); -$raw_post = file_get_contents ( 'php://input'); +require_once("CalDAVRequest.php"); +$request = new CalDAVRequest(); -if ( isset($debugging) && isset($_GET['method']) ) { - $_SERVER['REQUEST_METHOD'] = $_GET['method']; -} - -/** -* A variety of requests may set the "Depth" header to control recursion -*/ -$query_depth = ( isset($_SERVER['HTTP_DEPTH']) ? $_SERVER['HTTP_DEPTH'] : 0 ); -if ( $query_depth == 'infinite' ) $query_depth = 99; -$query_depth = intval($query_depth); - -/** -* Our path is /