File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
apps/files_trashbin/lib/Sabre Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 99namespace OCA \Files_Trashbin \Sabre ;
1010
1111use OCA \DAV \Connector \Sabre \FilesPlugin ;
12+ use OCA \Files_Trashbin \Trash \ITrashItem ;
1213use OCP \IPreview ;
1314use Sabre \DAV \INode ;
1415use Sabre \DAV \PropFind ;
@@ -24,6 +25,7 @@ class TrashbinPlugin extends ServerPlugin {
2425 public const TRASHBIN_TITLE = '{http://nextcloud.org/ns}trashbin-title ' ;
2526 public const TRASHBIN_DELETED_BY_ID = '{http://nextcloud.org/ns}trashbin-deleted-by-id ' ;
2627 public const TRASHBIN_DELETED_BY_DISPLAY_NAME = '{http://nextcloud.org/ns}trashbin-deleted-by-display-name ' ;
28+ public const TRASHBIN_BACKEND = '{http://nextcloud.org/ns}trashbin-backend ' ;
2729
2830 /** @var Server */
2931 private $ server ;
@@ -104,6 +106,14 @@ public function propFind(PropFind $propFind, INode $node) {
104106 $ propFind ->handle (FilesPlugin::MOUNT_TYPE_PROPERTYNAME , function () {
105107 return '' ;
106108 });
109+
110+ $ propFind ->handle (self ::TRASHBIN_BACKEND , function () use ($ node ) {
111+ $ fileInfo = $ node ->getFileInfo ();
112+ if (!($ fileInfo instanceof ITrashItem)) {
113+ return '' ;
114+ }
115+ return $ fileInfo ->getTrashBackend ()::class;
116+ });
107117 }
108118
109119 /**
You can’t perform that action at this time.
0 commit comments