summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-03-04 13:28:48 +0100
committerRobin Appelman <icewind@owncloud.com>2014-03-04 13:28:48 +0100
commit5ef37c28d1dc73c1fc16a731954b84b46c1943f4 (patch)
treea474078c1947e12293b4df26bb0d3068d5804a93 /apps/files/appinfo
parent331fc55e2d876123580986264f47318afcf9352b (diff)
downloadnextcloud-server-5ef37c28d1dc73c1fc16a731954b84b46c1943f4.tar.gz
nextcloud-server-5ef37c28d1dc73c1fc16a731954b84b46c1943f4.zip
Remove the need for a custom SabreDav server constructor
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/remote.php8
1 files changed, 4 insertions, 4 deletions
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));