diff options
author | Louis Chemineau <louis@chmn.me> | 2023-12-18 13:09:20 +0100 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2023-12-18 13:09:20 +0100 |
commit | 6aa2d2daee3e9649305a9b636495bb76473aa6b0 (patch) | |
tree | ff8a0fef05afdcf4d245a476cbbf07af52462f30 /apps/dav/lib/DAV/CustomPropertiesBackend.php | |
parent | f7bead00d1635683fab38daff246e7ad7e862d27 (diff) | |
download | nextcloud-server-6aa2d2daee3e9649305a9b636495bb76473aa6b0.tar.gz nextcloud-server-6aa2d2daee3e9649305a9b636495bb76473aa6b0.zip |
Don't query oc_properties for metadata props
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/dav/lib/DAV/CustomPropertiesBackend.php')
-rw-r--r-- | apps/dav/lib/DAV/CustomPropertiesBackend.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index 989d049fbd1..311fe0ea561 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -27,6 +27,7 @@ namespace OCA\DAV\DAV; use Exception; use OCA\DAV\Connector\Sabre\Directory; +use OCA\DAV\Connector\Sabre\FilesPlugin; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\IUser; @@ -136,7 +137,7 @@ class CustomPropertiesBackend implements BackendInterface { public function __construct( Tree $tree, IDBConnection $connection, - IUser $user + IUser $user, ) { $this->tree = $tree; $this->connection = $connection; @@ -156,7 +157,11 @@ class CustomPropertiesBackend implements BackendInterface { // these might appear $requestedProps = array_diff( $requestedProps, - self::IGNORED_PROPERTIES + self::IGNORED_PROPERTIES, + ); + $requestedProps = array_filter( + $requestedProps, + fn ($prop) => !str_starts_with($prop, FilesPlugin::FILE_METADATA_PREFIX), ); // substr of calendars/ => path is inside the CalDAV component |