Merge pull request #29876 from nextcloud/backport/29864/stable23

[stable23] Allow to fetch the creation time of folders
This commit is contained in:
Vincent Petry 2021-11-24 12:45:43 +01:00 committed by GitHub
commit 29166b6c61
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();
});