summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-02-23 21:35:43 +0100
committerGitHub <noreply@github.com>2024-02-23 21:35:43 +0100
commit9eece36235ffdda4dd496bd3bd2e74c64cb124d4 (patch)
tree7d1aed845903bf89f1c6ff1407912b087b1d4011 /apps/dav
parent437b53efe4af29a6ca3467c9de6c43063a83edfb (diff)
parent0f16153e4a52f9fceb80dac19318b2cf881db6e6 (diff)
downloadnextcloud-server-9eece36235ffdda4dd496bd3bd2e74c64cb124d4.tar.gz
nextcloud-server-9eece36235ffdda4dd496bd3bd2e74c64cb124d4.zip
Merge pull request #39553 from zero0cool0/fix/caldavbackend_getChangesForCalendar
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index 23812ff7e10..78441dc4118 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -2347,11 +2347,13 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @return array
*/
public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
- return $this->atomic(function () use ($calendarId, $syncToken, $syncLevel, $limit, $calendarType) {
+ $table = $calendarType === self::CALENDAR_TYPE_CALENDAR ? 'calendars': 'calendarsubscriptions';
+
+ return $this->atomic(function () use ($calendarId, $syncToken, $syncLevel, $limit, $calendarType, $table) {
// Current synctoken
$qb = $this->db->getQueryBuilder();
$qb->select('synctoken')
- ->from('calendars')
+ ->from($table)
->where(
$qb->expr()->eq('id', $qb->createNamedParameter($calendarId))
);