mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Bug fix: Select the correct table based on CALENDAR_TYPE_CALENDAR
Signed-off-by: Patrick Fischer <mail@patrickfischer.ch>
This commit is contained in:
parent
b0b4c7e042
commit
0f16153e4a
1 changed files with 4 additions and 2 deletions
|
|
@ -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))
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue