diff options
author | Thomas Citharel <tcit@tcit.fr> | 2022-05-12 09:58:33 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2022-05-12 15:28:36 +0200 |
commit | 8d7154318fb063d0e79bb344749e4be9ce26ef0b (patch) | |
tree | 96b0a685a7eecd2fc001c0900689177a070865ef /apps/dav/lib/CalDAV/Calendar.php | |
parent | 33ffaad14bd15c8f6ed370b28bc83feec4f69980 (diff) | |
download | nextcloud-server-8d7154318fb063d0e79bb344749e4be9ce26ef0b.tar.gz nextcloud-server-8d7154318fb063d0e79bb344749e4be9ce26ef0b.zip |
Put calendar invites into the user's first available calendar
If there's no default calendar and we can't find anything with URI
'personal', instead of creating a new one, start by using the first
"real personal calendar" available.
If not, then we create the default one.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps/dav/lib/CalDAV/Calendar.php')
-rw-r--r-- | apps/dav/lib/CalDAV/Calendar.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index 75c815c3b0a..79d2244b42c 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -400,7 +400,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IRestorable, IShareable return isset($this->calendarInfo['{http://owncloud.org/ns}public']); } - protected function isShared() { + public function isShared() { if (!isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal'])) { return false; } @@ -412,6 +412,13 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IRestorable, IShareable return isset($this->calendarInfo['{http://calendarserver.org/ns/}source']); } + public function isDeleted(): bool { + if (!isset($this->calendarInfo[TrashbinPlugin::PROPERTY_DELETED_AT])) { + return false; + } + return $this->calendarInfo[TrashbinPlugin::PROPERTY_DELETED_AT] !== null; + } + /** * @inheritDoc */ |