Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
perf(rich_workspace): only add property for parent
Signed-off-by: Grigorii K. Shartsev <[email protected]>
  • Loading branch information
ShGKme committed Jun 27, 2024
commit d609730d84b8511978ed4676dc45c784a495879c
6 changes: 5 additions & 1 deletion lib/DAV/WorkspacePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ public function propFind(PropFind $propFind, INode $node) {
return;
}

// Only return the property for the parent node and ignore it for further in depth nodes
if ($propFind->getDepth() !== $this->server->getHTTPDepth()) {
return;
}

$file = null;
$owner = $this->userId ?? $node->getFileInfo()->getStorage()->getOwner('');
/** @var Folder[] $nodes */
Expand All @@ -113,7 +118,6 @@ public function propFind(PropFind $propFind, INode $node) {
}
}

// Only return the property for the parent node and ignore it for further in depth nodes
$propFind->handle(self::WORKSPACE_PROPERTY, function () use ($file) {
if ($file instanceof File) {
return $file->getContent();
Expand Down