Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #36920 - custom properties are now properly set on REPORT with … #37058

Merged
merged 1 commit into from
Mar 2, 2020
Merged
Show file tree
Hide file tree
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
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 |