diff options
author | Patrick Fischer <mail@patrickfischer.ch> | 2023-07-24 13:49:40 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-02-23 20:46:07 +0000 |
commit | 76560a51b63ee49507740e7807e706d19995750c (patch) | |
tree | 77ef7bbb818770149c91170034bdb7bd23309cd6 /apps | |
parent | 5087de9f9892e97f5f72b96230a7067fbe8063ea (diff) | |
download | nextcloud-server-76560a51b63ee49507740e7807e706d19995750c.tar.gz nextcloud-server-76560a51b63ee49507740e7807e706d19995750c.zip |
Bug fix: Select the correct table based on CALENDAR_TYPE_CALENDAR
Signed-off-by: Patrick Fischer <mail@patrickfischer.ch>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 3556fd1c980..eb34aec9a58 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -2341,11 +2341,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)) ); |