optimize calendar search query

see https://github.com/nextcloud/calendar/issues/4758

Signed-off-by: Jamie McClelland <jm@mayfirst.org>
pull/39741/head
Jamie McClelland 2023-08-07 10:49:13 +07:00
parent b4a3f8088a
commit ece685d6f5
1 changed files with 1 additions and 1 deletions

@ -1847,7 +1847,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
// 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)));
}