diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2023-08-11 09:05:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-11 09:05:54 +0200 |
commit | cb1712745183e838b340dc9604d9bfdff30c991e (patch) | |
tree | bd612689a338416a41018aa750bb882bea9f46ce /apps | |
parent | 0642cecaae20ee43bb102888b362cf179920433f (diff) | |
parent | b025e67d8d9763a266ccc21997e753badb626d3e (diff) | |
download | nextcloud-server-cb1712745183e838b340dc9604d9bfdff30c991e.tar.gz nextcloud-server-cb1712745183e838b340dc9604d9bfdff30c991e.zip |
Merge pull request #39785 from nextcloud/backport/39741/stable27
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 1d526d89e6b..f4113de50b9 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -1845,9 +1845,13 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription ->andWhere($innerQuery->expr()->eq('op.calendartype', $outerQuery->createNamedParameter(self::CALENDAR_TYPE_CALENDAR))); + $outerQuery->select('c.id', 'c.calendardata', 'c.componenttype', 'c.uid', 'c.uri') + ->from('calendarobjects', 'c') + ->where($outerQuery->expr()->isNull('deleted_at')); + // only return public items for shared calendars for now if (isset($calendarInfo['{http://owncloud.org/ns}owner-principal']) === false || $calendarInfo['principaluri'] !== $calendarInfo['{http://owncloud.org/ns}owner-principal']) { - $innerQuery->andWhere($innerQuery->expr()->eq('c.classification', + $outerQuery->andWhere($outerQuery->expr()->eq('c.classification', $outerQuery->createNamedParameter(self::CLASSIFICATION_PUBLIC))); } @@ -1866,10 +1870,6 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $this->db->escapeLikeParameter($pattern) . '%'))); } - $outerQuery->select('c.id', 'c.calendardata', 'c.componenttype', 'c.uid', 'c.uri') - ->from('calendarobjects', 'c') - ->where($outerQuery->expr()->isNull('deleted_at')); - if (isset($options['timerange'])) { if (isset($options['timerange']['start']) && $options['timerange']['start'] instanceof DateTimeInterface) { $outerQuery->andWhere($outerQuery->expr()->gt('lastoccurence', |