summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV/CalDavBackend.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/CalDAV/CalDavBackend.php')
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index 9505a00ea55..73f0a287fae 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -2077,6 +2077,22 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
/**
+ * deletes all birthday calendars
+ */
+ public function deleteAllBirthdayCalendars() {
+ $query = $this->db->getQueryBuilder();
+ $result = $query->select(['id'])->from('calendars')
+ ->where($query->expr()->eq('uri',
+ $query->createNamedParameter(BirthdayService::BIRTHDAY_CALENDAR_URI)))
+ ->execute();
+
+ $ids = $result->fetchAll();
+ foreach($ids as $id) {
+ $this->deleteCalendar($id['id']);
+ }
+ }
+
+ /**
* read VCalendar data into a VCalendar object
*
* @param string $objectData