diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-21 12:34:20 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-21 12:34:20 +0200 |
commit | 38c729686728c743f5acb53a83b1d869dc429610 (patch) | |
tree | 5adcaf0fbe064feb6b5d60a37d1e93058e2f1843 /apps/dav/lib | |
parent | 93649d6fe8e2e079dec7fa3bd34f8d8c2306f055 (diff) | |
download | nextcloud-server-38c729686728c743f5acb53a83b1d869dc429610.tar.gz nextcloud-server-38c729686728c743f5acb53a83b1d869dc429610.zip |
Personal calendar should be generated even if the birthday calendar already exists - fixes #24082
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/hookmanager.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/dav/lib/hookmanager.php b/apps/dav/lib/hookmanager.php index 687e6718db3..aa3777088f8 100644 --- a/apps/dav/lib/hookmanager.php +++ b/apps/dav/lib/hookmanager.php @@ -20,6 +20,7 @@ */ namespace OCA\DAV; +use OCA\DAV\CalDAV\BirthdayService; use OCA\DAV\CalDAV\CalDavBackend; use OCA\DAV\CardDAV\CardDavBackend; use OCA\DAV\CardDAV\SyncService; @@ -103,7 +104,7 @@ class HookManager { if (!is_null($user)) { $principal = 'principals/users/' . $user->getUID(); $calendars = $this->calDav->getCalendarsForUser($principal); - if (empty($calendars)) { + if (empty($calendars) || (count($calendars) === 1 && $calendars[0]['uri'] === BirthdayService::BIRTHDAY_CALENDAR_URI)) { try { $this->calDav->createCalendar($principal, 'personal', [ '{DAV:}displayname' => 'Personal']); |