From dfef442ee5d21b7c9b3d3e31b8c78b92cd136953 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 6 Nov 2007 18:31:35 +1300 Subject: [PATCH] When a calendar is created with XML, then it's parent will be the target URL. --- inc/caldav-MKCALENDAR.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/caldav-MKCALENDAR.php b/inc/caldav-MKCALENDAR.php index 4c77affb..458bd6bd 100644 --- a/inc/caldav-MKCALENDAR.php +++ b/inc/caldav-MKCALENDAR.php @@ -17,7 +17,10 @@ if ( ! $request->AllowedTo('mkcalendar') ) { $displayname = $request->path; // Enforce trailling '/' on collection name -if ( ! preg_match( '#/$#', $request->path ) ) $request->path .= '/'; +if ( ! preg_match( '#/$#', $request->path ) ) { + dbg_error_log( "MKCALENDAR", "Add trailling '/' to '%s'", $request->path); + $request->path .= '/'; +} $parent_container = '/'; if ( preg_match( '#^(.*/)([^/]+)(/)?$#', $request->path, $matches ) ) { @@ -46,6 +49,7 @@ if ( isset($request->xml_tags) ) { case 'DAV::DISPLAYNAME': $displayname = $content; + $request->path .= $content . '/'; $success[$tag] = 1; break;