Skip to content

Commit

Permalink
optimize calendar search query
Browse files Browse the repository at this point in the history
see nextcloud/calendar#4758

Signed-off-by: Jamie McClelland <[email protected]>
  • Loading branch information
jmcclelland authored and backportbot-nextcloud[bot] committed Aug 10, 2023
1 parent 8ec206d commit a1e9b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ public function search(array $calendarInfo, $pattern, array $searchProperties,

// 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)));
}

Expand Down

0 comments on commit a1e9b90

Please sign in to comment.