mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #54314 from nextcloud/backport/54309/stable30
[stable30] fix: use correct return value for `has-preview` dav property
This commit is contained in:
commit
ae4fdef753
2 changed files with 6 additions and 3 deletions
|
|
@ -111,8 +111,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 () {
|
||||
|
|
|
|||
|
|
@ -78,7 +78,10 @@ class Plugin extends ServerPlugin {
|
|||
if ($node instanceof VersionFile) {
|
||||
$propFind->handle(self::VERSION_LABEL, fn () => $node->getMetadataValue('label'));
|
||||
$propFind->handle(self::VERSION_AUTHOR, fn () => $node->getMetadataValue('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