Skip to content

Commit

Permalink
Merge pull request #39553 from zero0cool0/fix/caldavbackend_getChange…
Browse files Browse the repository at this point in the history
…sForCalendar
  • Loading branch information
skjnldsv authored Feb 23, 2024
2 parents 437b53e + 0f16153 commit 9eece36
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -2347,11 +2347,13 @@ public function getCalendarObjectById(string $principalUri, int $id): ?array {
* @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))
);
Expand Down

0 comments on commit 9eece36

Please sign in to comment.