mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-31 18:46:02 +00:00
Fix the auto-creation of calendars so they are the same as the ones that
are created with MKCALENDAR.
This commit is contained in:
parent
b80b562ff9
commit
d046a85640
@ -34,7 +34,7 @@ dbg_log_array( "PUT", 'EVENT', $ic->properties['VCALENDAR'][0], true );
|
||||
|
||||
if ( isset($request_container) ) unset($request_container);
|
||||
if ( isset($request_name) ) unset($request_name);
|
||||
if ( preg_match( '#^(.*)/([^/]+)$#', $request_path, $matches ) ) {
|
||||
if ( preg_match( '#^(.*/)([^/]+)$#', $request_path, $matches ) ) {
|
||||
$request_container = $matches[1];
|
||||
$request_name = $matches[2];
|
||||
}
|
||||
@ -49,7 +49,7 @@ else {
|
||||
/**
|
||||
* Before we write the event, we check the container exists, creating it if it doesn't
|
||||
*/
|
||||
if ( $request_container == "/$path_username" ) {
|
||||
if ( $request_container == "/$path_username/" ) {
|
||||
dbg_error_log( "WARN", " Storing events directly in user's base folders is not recommended!");
|
||||
}
|
||||
else {
|
||||
@ -61,7 +61,7 @@ else {
|
||||
exit(0);
|
||||
}
|
||||
if ( $qry->rows == 0 ) {
|
||||
if ( preg_match( '#^(.*)/([^/]+)$#', $request_container, $matches ) ) {
|
||||
if ( preg_match( '#^(.*/)([^/]+/)$#', $request_container, $matches ) ) {
|
||||
$parent_container = $matches[1];
|
||||
$displayname = $matches[2];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user