aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/lib')
-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
-rw-r--r--apps/files_trashbin/lib/Trash/ITrashItem.php2
-rw-r--r--apps/files_trashbin/lib/Trash/TrashItem.php4
5 files changed, 17 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();
});
diff --git a/apps/files_trashbin/lib/Trash/ITrashItem.php b/apps/files_trashbin/lib/Trash/ITrashItem.php
index 74348cf1817..bd241c89a34 100644
--- a/apps/files_trashbin/lib/Trash/ITrashItem.php
+++ b/apps/files_trashbin/lib/Trash/ITrashItem.php
@@ -75,4 +75,6 @@ interface ITrashItem extends FileInfo {
* @since 15.0.0
*/
public function getUser(): IUser;
+
+ public function getTitle(): string;
}
diff --git a/apps/files_trashbin/lib/Trash/TrashItem.php b/apps/files_trashbin/lib/Trash/TrashItem.php
index a0a0e1f67ce..0112b6dbc8e 100644
--- a/apps/files_trashbin/lib/Trash/TrashItem.php
+++ b/apps/files_trashbin/lib/Trash/TrashItem.php
@@ -173,4 +173,8 @@ class TrashItem implements ITrashItem {
public function getExtension(): string {
return $this->fileInfo->getExtension();
}
+
+ public function getTitle(): string {
+ return $this->getOriginalLocation();
+ }
}