diff options
author | Georg Ehrke <developer@georgehrke.com> | 2018-08-24 17:23:14 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2019-07-18 12:42:11 +0200 |
commit | 9f6dd51912b76d13704d3843f9a87eaf38646d15 (patch) | |
tree | 8c7958d5a6760d6c978de3f0c1c3405d6f6df7e4 /apps/dav/lib/CalDAV/CachedSubscription.php | |
parent | 3d0e0f23530160419f182ac9e896dea6f7bc9f59 (diff) | |
download | nextcloud-server-9f6dd51912b76d13704d3843f9a87eaf38646d15.tar.gz nextcloud-server-9f6dd51912b76d13704d3843f9a87eaf38646d15.zip |
LIMIT is no column but a SQL feature, allow limit on initial sync
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/lib/CalDAV/CachedSubscription.php')
-rw-r--r-- | apps/dav/lib/CalDAV/CachedSubscription.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/dav/lib/CalDAV/CachedSubscription.php b/apps/dav/lib/CalDAV/CachedSubscription.php index a95ee15bbe5..da8c5434cf2 100644 --- a/apps/dav/lib/CalDAV/CachedSubscription.php +++ b/apps/dav/lib/CalDAV/CachedSubscription.php @@ -23,6 +23,7 @@ declare(strict_types=1); */ namespace OCA\DAV\CalDAV; +use OCA\DAV\Exception\UnsupportedLimitOnInitialSyncException; use Sabre\CalDAV\Backend\BackendInterface; use Sabre\DAV\Exception\MethodNotAllowed; use Sabre\DAV\Exception\NotFound; @@ -195,4 +196,15 @@ class CachedSubscription extends \Sabre\CalDAV\Calendar { public function calendarQuery(array $filters):array { return $this->caldavBackend->calendarQuery($this->calendarInfo['id'], $filters, CalDavBackend::CALENDAR_TYPE_SUBSCRIPTION); } + + /** + * @inheritDoc + */ + public function getChanges($syncToken, $syncLevel, $limit = null) { + if (!$syncToken && $limit) { + throw new UnsupportedLimitOnInitialSyncException(); + } + + return parent::getChanges($syncToken, $syncLevel, $limit); + } } |