summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV/CalendarProvider.php
diff options
context:
space:
mode:
authorAnna Larch <anna@nextcloud.com>2021-12-06 20:01:22 +0100
committerAnna Larch <anna@nextcloud.com>2022-03-16 12:48:50 +0100
commit0745fc50126e92406ec95265ef1ff5d4b5575d3e (patch)
tree452e44b917c0d242669ee93d58fc84d5210802e5 /apps/dav/lib/CalDAV/CalendarProvider.php
parenta626307da8e9a4e5124da1c35429892f745b2de9 (diff)
downloadnextcloud-server-0745fc50126e92406ec95265ef1ff5d4b5575d3e.tar.gz
nextcloud-server-0745fc50126e92406ec95265ef1ff5d4b5575d3e.zip
Move calendar objects between calendars instead of deleting and recreating them
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'apps/dav/lib/CalDAV/CalendarProvider.php')
-rw-r--r--apps/dav/lib/CalDAV/CalendarProvider.php9
1 files changed, 7 insertions, 2 deletions
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,