Skip to content

Commit

Permalink
Merge pull request #42357 from nextcloud/backport/42350/stable28
Browse files Browse the repository at this point in the history
[stable28] Don't query oc_properties for metadata props
  • Loading branch information
artonge authored Dec 18, 2023
2 parents 36f9106 + 112063b commit 4cbf64b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/dav/lib/DAV/CustomPropertiesBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

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;
Expand Down Expand Up @@ -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;
Expand All @@ -156,7 +157,11 @@ public function propFind($path, PropFind $propFind) {
// 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
Expand Down

0 comments on commit 4cbf64b

Please sign in to comment.