diff options
Diffstat (limited to 'apps/dav/lib/caldav/caldavbackend.php')
-rw-r--r-- | apps/dav/lib/caldav/caldavbackend.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/dav/lib/caldav/caldavbackend.php b/apps/dav/lib/caldav/caldavbackend.php index 3aa493e5087..52b4812b05b 100644 --- a/apps/dav/lib/caldav/caldavbackend.php +++ b/apps/dav/lib/caldav/caldavbackend.php @@ -106,7 +106,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription public function __construct(\OCP\IDBConnection $db, Principal $principalBackend) { $this->db = $db; $this->principalBackend = $principalBackend; - $this->sharingBackend = new Backend($this->db, 'calendar'); + $this->sharingBackend = new Backend($this->db, $principalBackend, 'calendar'); } /** @@ -172,7 +172,9 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $calendar[$xmlName] = $row[$dbName]; } - $calendars[$calendar['id']] = $calendar; + if (!isset($calendars[$calendar['id']])) { + $calendars[$calendar['id']] = $calendar; + } } $stmt->closeCursor(); @@ -221,7 +223,9 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $calendar[$xmlName] = $row[$dbName]; } - $calendars[$calendar['id']] = $calendar; + if (!isset($calendars[$calendar['id']])) { + $calendars[$calendar['id']] = $calendar; + } } $result->closeCursor(); |