aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib/Sabre
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions/lib/Sabre')
-rw-r--r--apps/files_versions/lib/Sabre/Plugin.php10
-rw-r--r--apps/files_versions/lib/Sabre/RootCollection.php1
-rw-r--r--apps/files_versions/lib/Sabre/VersionHome.php1
3 files changed, 9 insertions, 3 deletions
diff --git a/apps/files_versions/lib/Sabre/Plugin.php b/apps/files_versions/lib/Sabre/Plugin.php
index 10a1896773d..4b4cb0638bf 100644
--- a/apps/files_versions/lib/Sabre/Plugin.php
+++ b/apps/files_versions/lib/Sabre/Plugin.php
@@ -24,6 +24,10 @@ use Sabre\HTTP\ResponseInterface;
class Plugin extends ServerPlugin {
private Server $server;
+ public const LABEL = 'label';
+
+ public const AUTHOR = 'author';
+
public const VERSION_LABEL = '{http://nextcloud.org/ns}version-label';
public const VERSION_AUTHOR = '{http://nextcloud.org/ns}version-author'; // dav property for author
@@ -76,8 +80,8 @@ class Plugin extends ServerPlugin {
public function propFind(PropFind $propFind, INode $node): void {
if ($node instanceof VersionFile) {
- $propFind->handle(self::VERSION_LABEL, fn () => $node->getMetadataValue('label'));
- $propFind->handle(self::VERSION_AUTHOR, fn () => $node->getMetadataValue('author'));
+ $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()));
}
}
@@ -86,7 +90,7 @@ class Plugin extends ServerPlugin {
$node = $this->server->tree->getNodeForPath($path);
if ($node instanceof VersionFile) {
- $propPatch->handle(self::VERSION_LABEL, fn (string $label) => $node->setMetadataValue('label', $label));
+ $propPatch->handle(self::VERSION_LABEL, fn (string $label) => $node->setMetadataValue(self::LABEL, $label));
}
}
}
diff --git a/apps/files_versions/lib/Sabre/RootCollection.php b/apps/files_versions/lib/Sabre/RootCollection.php
index ded4f3dda7b..1e7129f23da 100644
--- a/apps/files_versions/lib/Sabre/RootCollection.php
+++ b/apps/files_versions/lib/Sabre/RootCollection.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/files_versions/lib/Sabre/VersionHome.php b/apps/files_versions/lib/Sabre/VersionHome.php
index 7f182958d94..07ac491f2a1 100644
--- a/apps/files_versions/lib/Sabre/VersionHome.php
+++ b/apps/files_versions/lib/Sabre/VersionHome.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later