Merge pull request #39553 from zero0cool0/fix/caldavbackend_getChangesForCalendar

pull/41038/head
John Molakvoæ 9 months ago committed by GitHub
commit 9eece36235
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      apps/dav/lib/CalDAV/CalDavBackend.php

@ -2347,11 +2347,13 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @return array * @return array
*/ */
public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null, $calendarType = self::CALENDAR_TYPE_CALENDAR) { 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 // Current synctoken
$qb = $this->db->getQueryBuilder(); $qb = $this->db->getQueryBuilder();
$qb->select('synctoken') $qb->select('synctoken')
->from('calendars') ->from($table)
->where( ->where(
$qb->expr()->eq('id', $qb->createNamedParameter($calendarId)) $qb->expr()->eq('id', $qb->createNamedParameter($calendarId))
); );

Loading…
Cancel
Save