diff --git a/apps/files_trashbin/lib/Sabre/ITrash.php b/apps/files_trashbin/lib/Sabre/ITrash.php index b0ff2b1570a867e757602e309a9065a98ea81a07..7ec27f7885920e46d41c9de0ba9c7b1d944a5300 100644 --- a/apps/files_trashbin/lib/Sabre/ITrash.php +++ b/apps/files_trashbin/lib/Sabre/ITrash.php @@ -29,4 +29,6 @@ interface ITrash { public function getFilename(): string; public function getOriginalLocation(): string; + + public function getDeletionTime(): int; } diff --git a/apps/files_trashbin/lib/Sabre/PropfindPlugin.php b/apps/files_trashbin/lib/Sabre/PropfindPlugin.php index e50ee08590afc8708fc788f0c27cf07befb3b54e..a0aaa552a14aec6b323ad3a61d1cdd91e3d26c1e 100644 --- a/apps/files_trashbin/lib/Sabre/PropfindPlugin.php +++ b/apps/files_trashbin/lib/Sabre/PropfindPlugin.php @@ -33,6 +33,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'; /** @var Server */ private $server; @@ -59,6 +60,10 @@ class PropfindPlugin extends ServerPlugin { $propFind->handle(self::TRASHBIN_ORIGINAL_LOCATION, function() use ($node) { return $node->getOriginalLocation(); }); + + $propFind->handle(self::TRASHBIN_DELETION_TIME, function () use ($node) { + return $node->getDeletionTime(); + }); } } diff --git a/apps/files_trashbin/lib/Sabre/TrashFile.php b/apps/files_trashbin/lib/Sabre/TrashFile.php index 29e7a955623c16aadca3ba0f44203f09d861f252..e4c67cbfb31b5a41331cb35f4c5f5b864512a981 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFile.php +++ b/apps/files_trashbin/lib/Sabre/TrashFile.php @@ -87,5 +87,7 @@ class TrashFile implements IFile, ITrash { return $this->data['extraData']; } - + public function getDeletionTime(): int { + return $this->getLastModified(); + } } diff --git a/apps/files_trashbin/lib/Sabre/TrashFolder.php b/apps/files_trashbin/lib/Sabre/TrashFolder.php index 33236eea262f1c1dfe93a667aaed04790ab09da7..e1fd965487b0a2be24a5e542d9501a06ff0d4bf2 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolder.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolder.php @@ -116,5 +116,8 @@ class TrashFolder implements ICollection, ITrash { return $this->data['extraData']; } + public function getDeletionTime(): int { + return $this->getLastModified(); + } } diff --git a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php index 95e82d95a6ee9a339c0208fa75ae7af5f9c00f33..9dd2f7b3ef5780173902e03c98686b6d9173cfdd 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php @@ -98,5 +98,7 @@ class TrashFolderFile implements IFile, ITrash { return $this->location . '/' . $this->getFilename(); } - + public function getDeletionTime(): int { + return $this->getLastModified(); + } } diff --git a/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php b/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php index d2923c58916aa4189639efee6b57a6b768245d8f..3c2c4138095868a944af80a2c8a7850bfff534e3 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php @@ -129,5 +129,7 @@ class TrashFolderFolder implements ICollection, ITrash { return $this->location . '/' . $this->getFilename(); } - + public function getDeletionTime(): int { + return $this->getLastModified(); + } }