Skip to content

Commit 1d21f04

Browse files
Carl Schwanbackportbot[bot]
authored andcommitted
perf(calendar): Disable custom properties for individual calendar events
Save a query per event stored in the calendar and at least on the production instance, there is no entries in the table for the events. Signed-off-by: Carl Schwan <[email protected]>
1 parent e5c2be1 commit 1d21f04

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/dav/lib/DAV/CustomPropertiesBackend.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use Exception;
1111
use OCA\DAV\CalDAV\Calendar;
12+
use OCA\DAV\CalDAV\CalendarObject;
1213
use OCA\DAV\CalDAV\DefaultCalendarValidator;
1314
use OCA\DAV\Connector\Sabre\Directory;
1415
use OCA\DAV\Connector\Sabre\FilesPlugin;
@@ -223,6 +224,11 @@ public function propFind($path, PropFind $propFind) {
223224
$this->cacheDirectory($path, $node);
224225
}
225226

227+
if ($node instanceof CalendarObject) {
228+
// No custom properties supported on individual events
229+
return;
230+
}
231+
226232
// First fetch the published properties (set by another user), then get the ones set by
227233
// the current user. If both are set then the latter as priority.
228234
foreach ($this->getPublishedProperties($path, $requestedProps) as $propName => $propValue) {

0 commit comments

Comments
 (0)