When a calendar is created with XML, then it's parent will be the target URL.

This commit is contained in:
Andrew McMillan 2007-11-06 18:31:35 +13:00
parent d99f8ccc35
commit dfef442ee5

View File

@ -17,7 +17,10 @@ if ( ! $request->AllowedTo('mkcalendar') ) {
$displayname = $request->path; $displayname = $request->path;
// Enforce trailling '/' on collection name // 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 = '/'; $parent_container = '/';
if ( preg_match( '#^(.*/)([^/]+)(/)?$#', $request->path, $matches ) ) { if ( preg_match( '#^(.*/)([^/]+)(/)?$#', $request->path, $matches ) ) {
@ -46,6 +49,7 @@ if ( isset($request->xml_tags) ) {
case 'DAV::DISPLAYNAME': case 'DAV::DISPLAYNAME':
$displayname = $content; $displayname = $content;
$request->path .= $content . '/';
$success[$tag] = 1; $success[$tag] = 1;
break; break;