Merge pull request #54309 from nextcloud/fix/dav-wrong-return-type

pull/54327/head
John Molakvoæ 2025-08-07 11:35:45 +07:00 committed by GitHub
commit a488bff27a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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',
);
}
}