From 5ef37c28d1dc73c1fc16a731954b84b46c1943f4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 4 Mar 2014 13:28:48 +0100 Subject: Remove the need for a custom SabreDav server constructor --- apps/files/appinfo/remote.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/files/appinfo/remote.php') diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php index 1922bc4fcdd..d9c667c0106 100644 --- a/apps/files/appinfo/remote.php +++ b/apps/files/appinfo/remote.php @@ -35,7 +35,8 @@ $lockBackend = new OC_Connector_Sabre_Locks(); $requestBackend = new OC_Connector_Sabre_Request(); // Fire up server -$server = new OC_Connector_Sabre_Server(); +$objectTree = new \OC\Connector\Sabre\ObjectTree(); +$server = new OC_Connector_Sabre_Server($objectTree); $server->httpRequest = $requestBackend; $server->setBaseUri($baseuri); @@ -49,14 +50,13 @@ $server->addPlugin(new OC_Connector_Sabre_MaintenancePlugin()); $server->addPlugin(new OC_Connector_Sabre_ExceptionLoggerPlugin('webdav')); // wait with registering these until auth is handled and the filesystem is setup -$server->subscribeEvent('beforeMethod', function () use ($server) { +$server->subscribeEvent('beforeMethod', function () use ($server, $objectTree) { $view = \OC\Files\Filesystem::getView(); $rootInfo = $view->getFileInfo(''); // Create ownCloud Dir $rootDir = new OC_Connector_Sabre_Directory($view, $rootInfo); - $objectTree = new \OC\Connector\Sabre\ObjectTree($rootDir, $view); - $server->setObjectTree($objectTree); + $objectTree->init($rootDir, $view); $server->addPlugin(new OC_Connector_Sabre_AbortedUploadDetectionPlugin($view)); $server->addPlugin(new OC_Connector_Sabre_QuotaPlugin($view)); -- cgit v1.2.3