]> source.dussan.org Git - nextcloud-server.git/commitdiff
optimize calendar search query
authorJamie McClelland <jm@mayfirst.org>
Mon, 7 Aug 2023 14:49:13 +0000 (10:49 -0400)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Thu, 10 Aug 2023 07:52:04 +0000 (07:52 +0000)
see https://github.com/nextcloud/calendar/issues/4758

Signed-off-by: Jamie McClelland <jm@mayfirst.org>
apps/dav/lib/CalDAV/CalDavBackend.php

index f0fd29852bb6b4ce68c2ffa14657d33440e403b0..8b1e3ac6ea9efd129a5390dc82956eae184976bd 100644 (file)
@@ -1826,7 +1826,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)));
                }