diff options
author | Georg Ehrke <developer@georgehrke.com> | 2018-09-01 23:04:07 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2018-09-05 14:10:26 +0200 |
commit | 83639a9898581919a84f1e2b05e64b236c8268e2 (patch) | |
tree | 062fa06720501b970175729d460fe061c010dc8a /apps/dav/lib/CalDAV/Plugin.php | |
parent | 1c1bf01241a0e7d182a135df02cf85004eb4b898 (diff) | |
download | nextcloud-server-83639a9898581919a84f1e2b05e64b236c8268e2.tar.gz nextcloud-server-83639a9898581919a84f1e2b05e64b236c8268e2.zip |
remove LogicException, because it's also triggered with legitimate parameters
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/lib/CalDAV/Plugin.php')
-rw-r--r-- | apps/dav/lib/CalDAV/Plugin.php | 14 |
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'); } } |