Skip to content

Commit

Permalink
Fix propfind type of subnodes with depth >= 1
Browse files Browse the repository at this point in the history
When custom properties are manually added in a plugin with the `propFind` event like in this example: #482 and depth >= 1, the subnodes' propfind's type was incorrectly deducted.
This resulted in custom properties only added to the first node and not on the subnodes.
  • Loading branch information
n-peugnet committed Nov 3, 2021
1 parent 38f1394 commit 1383813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DAV/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ private function generatePathNodes(PropFind $propFind, array $yieldFirst = null)
}

$propertyNames = $propFind->getRequestedProperties();
$propFindType = !empty($propertyNames) ? PropFind::NORMAL : PropFind::ALLPROPS;
$propFindType = !$propFind->isAllProps() ? PropFind::NORMAL : PropFind::ALLPROPS;

foreach ($this->tree->getChildren($path) as $childNode) {
if ('' !== $path) {
Expand Down

0 comments on commit 1383813

Please sign in to comment.