Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/CalDAV/Plugin.php')
-rw-r--r--apps/dav/lib/CalDAV/Plugin.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/dav/lib/CalDAV/Plugin.php b/apps/dav/lib/CalDAV/Plugin.php
index f37d9c571a0..174930b2923 100644
--- a/apps/dav/lib/CalDAV/Plugin.php
+++ b/apps/dav/lib/CalDAV/Plugin.php
@@ -28,10 +28,16 @@ class Plugin extends \Sabre\CalDAV\Plugin {
const SYSTEM_CALENDAR_ROOT = 'system-calendars';
/**
- * @inheritdoc
+ * Returns the path to a principal's calendar home.
+ *
+ * The return url must not end with a slash.
+ * This function should return null in case a principal did not have
+ * a calendar home.
+ *
+ * @param string $principalUrl
+ * @return string|null
*/
- function getCalendarHomeForPrincipal($principalUrl):string {
-
+ function getCalendarHomeForPrincipal($principalUrl) {
if (strrpos($principalUrl, 'principals/users', -strlen($principalUrl)) !== false) {
list(, $principalId) = \Sabre\Uri\split($principalUrl);
return self::CALENDAR_ROOT . '/' . $principalId;
@@ -44,8 +50,6 @@ class Plugin extends \Sabre\CalDAV\Plugin {
list(, $principalId) = \Sabre\Uri\split($principalUrl);
return self::SYSTEM_CALENDAR_ROOT . '/calendar-rooms/' . $principalId;
}
-
- throw new \LogicException('This is not supposed to happen');
}
}