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 1eb3ee9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 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
4 changes: 4 additions & 0 deletions changelog/unreleased/37058
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Change: Return correct custom dav properties for folder contents

https://github.com/owncloud/core/pull/37058
https://github.com/owncloud/core/issues/36920
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 |

0 comments on commit 1eb3ee9

Please sign in to comment.