Merge pull request #29878 from nextcloud/backport/29864/stable22

[stable22] Allow to fetch the creation time of folders
This commit is contained in:
Vincent Petry 2021-11-24 13:59:13 +01:00 committed by GitHub
commit ae51c54c52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -391,12 +391,13 @@ class FilesPlugin extends ServerPlugin {
$user->getUID()
);
});
}
if ($node instanceof \OCA\DAV\Connector\Sabre\Node) {
$propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function () use ($node) {
return $this->config->getSystemValue('data-fingerprint', '');
});
$propFind->handle(self::CREATION_TIME_PROPERTYNAME, function () use ($node) {
return $node->getFileInfo()->getCreationTime();
});
}
if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
@ -423,10 +424,6 @@ class FilesPlugin extends ServerPlugin {
return new ChecksumList($checksum);
});
$propFind->handle(self::CREATION_TIME_PROPERTYNAME, function () use ($node) {
return $node->getFileInfo()->getCreationTime();
});
$propFind->handle(self::UPLOAD_TIME_PROPERTYNAME, function () use ($node) {
return $node->getFileInfo()->getUploadTime();
});