Skip to content

Commit

Permalink
Fixes #36920 - custom properties are now properly set on REPORT with …
Browse files Browse the repository at this point in the history
…depth !== 0
  • Loading branch information
DeepDiver1975 committed Mar 2, 2020
1 parent cb8d8cd commit 4f7d1f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/dav/lib/DAV/FileCustomPropertiesBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,14 @@ protected function loadChildrenProperties(INode $node, $requestedProperties) {
$sql .= ' AND `propertyname` in (?) ORDER BY `propertyname`';

$fileIdChunks = $this->getChunks($childrenIds, \count($requestedProperties));
$props = [];
foreach ($fileIdChunks as $chunk) {
$result = $this->connection->executeQuery(
$sql,
[$chunk, $requestedProperties],
[Connection::PARAM_STR_ARRAY, Connection::PARAM_STR_ARRAY]
);
while ($row = $result->fetch()) {
$props = $this->offsetGet($row['fileid']) ?? [];
$props[$row['propertyname']] = $row['propertyvalue'];
$this->offsetSet($row['fileid'], $props);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,8 @@ Feature: get file properties
Then the HTTP status code should be success
And as user "user0" the last response should have the following properties
| resource | property | value |
| /TestFolder/test1.txt | testprop1 | CCCCC |
#| /TestFolder/test1.txt | testprop1 | AAAAA |
| /TestFolder/test1.txt | testprop1 | AAAAA |
| /TestFolder/test1.txt | testprop2 | BBBBB |
| /TestFolder/test2.txt | testprop1 | CCCCC |
| /TestFolder/test2.txt | testprop2 | DDDDD |
| /TestFolder/ | status | HTTP/1.1 404 Not Found |
#| /TestFolder/ | status | HTTP/1.1 200 OK |
| /TestFolder/ | status | HTTP/1.1 200 OK |

0 comments on commit 4f7d1f1

Please sign in to comment.