From 0745fc50126e92406ec95265ef1ff5d4b5575d3e Mon Sep 17 00:00:00 2001 From: Anna Larch Date: Mon, 6 Dec 2021 20:01:22 +0100 Subject: Move calendar objects between calendars instead of deleting and recreating them Signed-off-by: Anna Larch --- apps/dav/lib/CalDAV/CalendarProvider.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps/dav/lib/CalDAV/CalendarProvider.php') diff --git a/apps/dav/lib/CalDAV/CalendarProvider.php b/apps/dav/lib/CalDAV/CalendarProvider.php index 85ead6117a6..f29c601db2d 100644 --- a/apps/dav/lib/CalDAV/CalendarProvider.php +++ b/apps/dav/lib/CalDAV/CalendarProvider.php @@ -28,6 +28,7 @@ namespace OCA\DAV\CalDAV; use OCP\Calendar\ICalendarProvider; use OCP\IConfig; use OCP\IL10N; +use Psr\Log\LoggerInterface; class CalendarProvider implements ICalendarProvider { @@ -40,10 +41,14 @@ class CalendarProvider implements ICalendarProvider { /** @var IConfig */ private $config; - public function __construct(CalDavBackend $calDavBackend, IL10N $l10n, IConfig $config) { + /** @var LoggerInterface */ + private $logger; + + public function __construct(CalDavBackend $calDavBackend, IL10N $l10n, IConfig $config, LoggerInterface $logger) { $this->calDavBackend = $calDavBackend; $this->l10n = $l10n; $this->config = $config; + $this->logger = $logger; } public function getCalendars(string $principalUri, array $calendarUris = []): array { @@ -60,7 +65,7 @@ class CalendarProvider implements ICalendarProvider { $iCalendars = []; foreach ($calendarInfos as $calendarInfo) { - $calendar = new Calendar($this->calDavBackend, $calendarInfo, $this->l10n, $this->config); + $calendar = new Calendar($this->calDavBackend, $calendarInfo, $this->l10n, $this->config, $this->logger); $iCalendars[] = new CalendarImpl( $calendar, $calendarInfo, -- cgit v1.2.3