diff options
author | Robin Appelman <robin@icewind.nl> | 2018-09-03 18:30:10 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-09-20 17:03:26 +0200 |
commit | 6372ae3a98537e8d1b5c5adf4fc446bc0651c2b1 (patch) | |
tree | 784a6fae2ac39cc4956ae42bbc24103a31b41ca3 /apps/files_trashbin/lib/Sabre/TrashFolder.php | |
parent | 58e281857f421b69479f9fa2a01d5d52410cde6a (diff) | |
download | nextcloud-server-6372ae3a98537e8d1b5c5adf4fc446bc0651c2b1.tar.gz nextcloud-server-6372ae3a98537e8d1b5c5adf4fc446bc0651c2b1.zip |
expose additional props from trashbin sabre endpoint
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_trashbin/lib/Sabre/TrashFolder.php')
-rw-r--r-- | apps/files_trashbin/lib/Sabre/TrashFolder.php | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/apps/files_trashbin/lib/Sabre/TrashFolder.php b/apps/files_trashbin/lib/Sabre/TrashFolder.php index 6b7d71b80ee..d884eefcc9f 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolder.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolder.php @@ -28,16 +28,13 @@ use Sabre\DAV\Exception\Forbidden; use Sabre\DAV\Exception\NotFound; use Sabre\DAV\ICollection; -class TrashFolder implements ICollection, ITrash { +class TrashFolder extends AbstractTrash implements ICollection, ITrash { /** @var string */ private $userId; - /** @var FileInfo */ - private $data; - public function __construct(string $root, string $userId, FileInfo $data) { $this->userId = $userId; - $this->data = $data; + parent::__construct($data); } public function createFile($name, $data = null) { @@ -100,31 +97,11 @@ class TrashFolder implements ICollection, ITrash { throw new Forbidden(); } - public function getLastModified(): int { - return $this->data->getMtime(); - } - public function restore(): bool { return \OCA\Files_Trashbin\Trashbin::restore($this->getName(), $this->data->getName(), $this->getLastModified()); } - public function getFilename(): string { - return $this->data->getName(); - } - public function getOriginalLocation(): string { return $this->data['extraData']; } - - public function getDeletionTime(): int { - return $this->getLastModified(); - } - - public function getSize(): int { - return $this->data->getSize(); - } - - public function getFileId(): int { - return $this->data->getId(); - } } |