aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/Sabre
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/lib/Sabre')
-rw-r--r--apps/files_trashbin/lib/Sabre/AbstractTrash.php4
-rw-r--r--apps/files_trashbin/lib/Sabre/ITrash.php2
-rw-r--r--apps/files_trashbin/lib/Sabre/PropfindPlugin.php5
3 files changed, 11 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/Sabre/AbstractTrash.php b/apps/files_trashbin/lib/Sabre/AbstractTrash.php
index b4d13a41e38..90f14fddd58 100644
--- a/apps/files_trashbin/lib/Sabre/AbstractTrash.php
+++ b/apps/files_trashbin/lib/Sabre/AbstractTrash.php
@@ -79,6 +79,10 @@ abstract class AbstractTrash implements ITrash {
return $this->data->getOriginalLocation();
}
+ public function getTitle(): string {
+ return $this->data->getTitle();
+ }
+
public function delete() {
$this->trashManager->removeItem($this->data);
}
diff --git a/apps/files_trashbin/lib/Sabre/ITrash.php b/apps/files_trashbin/lib/Sabre/ITrash.php
index 49c600c3f18..7a05fbe9507 100644
--- a/apps/files_trashbin/lib/Sabre/ITrash.php
+++ b/apps/files_trashbin/lib/Sabre/ITrash.php
@@ -32,6 +32,8 @@ interface ITrash {
public function getOriginalLocation(): string;
+ public function getTitle(): string;
+
public function getDeletionTime(): int;
public function getSize();
diff --git a/apps/files_trashbin/lib/Sabre/PropfindPlugin.php b/apps/files_trashbin/lib/Sabre/PropfindPlugin.php
index 19da79fd2a3..81fed3eba2b 100644
--- a/apps/files_trashbin/lib/Sabre/PropfindPlugin.php
+++ b/apps/files_trashbin/lib/Sabre/PropfindPlugin.php
@@ -37,6 +37,7 @@ class PropfindPlugin extends ServerPlugin {
const TRASHBIN_FILENAME = '{http://nextcloud.org/ns}trashbin-filename';
const TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location';
const TRASHBIN_DELETION_TIME = '{http://nextcloud.org/ns}trashbin-deletion-time';
+ const TRASHBIN_TITLE = '{http://nextcloud.org/ns}trashbin-title';
/** @var Server */
private $server;
@@ -70,6 +71,10 @@ class PropfindPlugin extends ServerPlugin {
return $node->getOriginalLocation();
});
+ $propFind->handle(self::TRASHBIN_TITLE, function () use ($node) {
+ return $node->getTitle();
+ });
+
$propFind->handle(self::TRASHBIN_DELETION_TIME, function () use ($node) {
return $node->getDeletionTime();
});