mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Merge pull request #54309 from nextcloud/fix/dav-wrong-return-type
This commit is contained in:
commit
a488bff27a
2 changed files with 6 additions and 3 deletions
|
|
@ -104,8 +104,8 @@ class TrashbinPlugin extends ServerPlugin {
|
|||
return $node->getFileId();
|
||||
});
|
||||
|
||||
$propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
|
||||
return $this->previewManager->isAvailable($node->getFileInfo());
|
||||
$propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, function () use ($node): string {
|
||||
return $this->previewManager->isAvailable($node->getFileInfo()) ? 'true' : 'false';
|
||||
});
|
||||
|
||||
$propFind->handle(FilesPlugin::MOUNT_TYPE_PROPERTYNAME, function () {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,10 @@ class Plugin extends ServerPlugin {
|
|||
if ($node instanceof VersionFile) {
|
||||
$propFind->handle(self::VERSION_LABEL, fn () => $node->getMetadataValue(self::LABEL));
|
||||
$propFind->handle(self::VERSION_AUTHOR, fn () => $node->getMetadataValue(self::AUTHOR));
|
||||
$propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, fn () => $this->previewManager->isMimeSupported($node->getContentType()));
|
||||
$propFind->handle(
|
||||
FilesPlugin::HAS_PREVIEW_PROPERTYNAME,
|
||||
fn (): string => $this->previewManager->isMimeSupported($node->getContentType()) ? 'true' : 'false',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue