diff options
author | Jamie McClelland <jm@mayfirst.org> | 2023-08-07 13:35:08 -0400 |
---|---|---|
committer | Jamie McClelland <jm@mayfirst.org> | 2023-08-07 14:43:23 -0400 |
commit | 4a98bb99721c4047ed1a979214cf1ddc38c482d1 (patch) | |
tree | aeddcd6003e1b4518b435d7e38f84c4454227198 /apps/dav | |
parent | ece685d6f5647c72e9c69340bb83e9f254419818 (diff) | |
download | nextcloud-server-4a98bb99721c4047ed1a979214cf1ddc38c482d1.tar.gz nextcloud-server-4a98bb99721c4047ed1a979214cf1ddc38c482d1.zip |
ensure outerquery ->where() function doesn't clobber earier ->andWhere()
Signed-off-by: Jamie McClelland <jm@mayfirst.org>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index df206b4ca57..7e7ee1c9c9d 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -1845,6 +1845,10 @@ 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']) { $outerQuery->andWhere($outerQuery->expr()->eq('c.classification', @@ -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', |