mirror of
https://github.com/nextcloud/server.git
synced 2026-03-13 22:22:25 -04:00
ensure outerquery ->where() function doesn't clobber earier ->andWhere()
Signed-off-by: Jamie McClelland <jm@mayfirst.org>
This commit is contained in:
parent
4f898b9b36
commit
1bc8feb332
1 changed files with 4 additions and 4 deletions
|
|
@ -1824,6 +1824,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',
|
||||
|
|
@ -1845,10 +1849,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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue