diff options
author | Thomas Citharel <tcit@tcit.fr> | 2020-04-05 20:57:26 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2020-04-13 15:07:43 +0200 |
commit | 0408c37b3de77fd351c1a2fa91f74e47fc7e6cd6 (patch) | |
tree | 1694bca0de9d095ca39510dc777c5765142ce4ce /apps/dav/lib | |
parent | ebdf66b70619a30fd3f9172c1b725b8f56ea9358 (diff) | |
download | nextcloud-server-0408c37b3de77fd351c1a2fa91f74e47fc7e6cd6.tar.gz nextcloud-server-0408c37b3de77fd351c1a2fa91f74e47fc7e6cd6.zip |
Only delete the default calendar setting when the default calendar
itself is deleted
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/AppInfo/Application.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index c22afa755cb..d5e3358d96d 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -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'); + } } }); } |