diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-17 16:51:19 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-17 16:51:19 +0100 |
commit | 7d638fdb3418be7990c230290494a8fd6d1a25d5 (patch) | |
tree | 930b274b1370af7a616a4580d3770d1f49adc516 /apps/dav/lib/server.php | |
parent | 8fb3e446107da26ac654ffc25af6814a17cb9022 (diff) | |
download | nextcloud-server-7d638fdb3418be7990c230290494a8fd6d1a25d5.tar.gz nextcloud-server-7d638fdb3418be7990c230290494a8fd6d1a25d5.zip |
In debugging mode we enable Sabre's browser plugin since it helps a lot when debugging
Diffstat (limited to 'apps/dav/lib/server.php')
-rw-r--r-- | apps/dav/lib/server.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/dav/lib/server.php b/apps/dav/lib/server.php index 05e81a1184c..f624137f316 100644 --- a/apps/dav/lib/server.php +++ b/apps/dav/lib/server.php @@ -28,6 +28,7 @@ use OCA\DAV\Connector\FedAuth; use OCA\DAV\Connector\Sabre\Auth; use OCA\DAV\Connector\Sabre\BlockLegacyClientPlugin; use OCA\DAV\Connector\Sabre\DavAclPlugin; +use OCA\DAV\Connector\Sabre\DummyGetResponsePlugin; use OCA\DAV\Connector\Sabre\FilesPlugin; use OCA\DAV\Files\CustomPropertiesBackend; use OCP\IRequest; @@ -68,7 +69,13 @@ class Server { $event = new SabrePluginEvent($this->server); $dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event); - $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\DummyGetResponsePlugin()); + // debugging + if(\OC::$server->getConfig()->getSystemValue('debug', false)) { + $this->server->addPlugin(new \Sabre\DAV\Browser\Plugin()); + } else { + $this->server->addPlugin(new DummyGetResponsePlugin()); + } + $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $logger)); $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin()); $this->server->addPlugin(new \Sabre\DAV\Sync\Plugin()); |