Only delete the default calendar setting when the default calendar
itself is deleted Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
ebdf66b706
commit
0408c37b3d
|
@ -255,7 +255,10 @@ class Application extends App {
|
|||
$principalUri = $event->getArgument('calendarData')['principaluri'];
|
||||
if (strpos($principalUri, 'principals/users') === 0) {
|
||||
list(, $UID) = \Sabre\Uri\split($principalUri);
|
||||
$config->deleteUserValue($UID, 'dav', 'defaultCalendar');
|
||||
$uri = $event->getArgument('calendarData')['uri'];
|
||||
if ($config->getUserValue($UID, 'dav', 'defaultCalendar') === $uri) {
|
||||
$config->deleteUserValue($UID, 'dav', 'defaultCalendar');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue