diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-04-16 17:02:50 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-04-25 20:25:10 +0200 |
commit | cb617c4949f9b8570f65bf972c29d4cd78bc9b6e (patch) | |
tree | 08b2a33ab2bff82333b2b369fd8494e703b5e23b /apps/files_trashbin/lib/Sabre/TrashFile.php | |
parent | f7ca6149d63d09f8ea0828770a243cf61295e2b9 (diff) | |
download | nextcloud-server-cb617c4949f9b8570f65bf972c29d4cd78bc9b6e.tar.gz nextcloud-server-cb617c4949f9b8570f65bf972c29d4cd78bc9b6e.zip |
Add special restore folder
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_trashbin/lib/Sabre/TrashFile.php')
-rw-r--r-- | apps/files_trashbin/lib/Sabre/TrashFile.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/Sabre/TrashFile.php b/apps/files_trashbin/lib/Sabre/TrashFile.php index 39b788a2e2c..3e801a27579 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFile.php +++ b/apps/files_trashbin/lib/Sabre/TrashFile.php @@ -26,7 +26,7 @@ use OCP\Files\FileInfo; use Sabre\DAV\Exception\Forbidden; use Sabre\DAV\IFile; -class TrashFile implements IFile { +class TrashFile implements IFile, ITrash { /** @var string */ private $userId; @@ -74,4 +74,8 @@ class TrashFile implements IFile { return $this->data->getMtime(); } + public function restore(): bool { + return \OCA\Files_Trashbin\Trashbin::restore($this->getName(), $this->data->getName(), $this->getLastModified()); + } + } |