Browse Source

Fix webdav access

* Correct namespace
* Pass the EventDispatcher to the webDAV server
tags/v9.0beta1
Roeland Jago Douma 8 years ago
parent
commit
ca27024fa2

+ 2
- 1
apps/dav/appinfo/v1/webdav.php View File

@@ -39,7 +39,8 @@ $serverFactory = new \OCA\DAV\Connector\Sabre\ServerFactory(
\OC::$server->getDatabaseConnection(),
\OC::$server->getUserSession(),
\OC::$server->getMountManager(),
\OC::$server->getTagManager()
\OC::$server->getTagManager(),
\OC::$server->getEventDispatcher()
);

// Backends

+ 2
- 2
apps/dav/lib/connector/sabre/listenerplugin.php View File

@@ -19,7 +19,7 @@
*
*/

namespace OC\Connector\Sabre;
namespace OCA\DAV\Connector\Sabre;

use OCP\AppFramework\Http;
use OCP\SabrePluginEvent;
@@ -57,7 +57,7 @@ class ListenerPlugin extends ServerPlugin {
public function emitListener() {
$event = new SabrePluginEvent();

$this->dispatcher->dispatch('OC\Connector\Sabre::beforeMethod', $event);
$this->dispatcher->dispatch('OCA\DAV\Connector\Sabre::beforeMethod', $event);

if ($event->getStatusCode() !== Http::STATUS_OK) {
throw new SabrePluginException($event->getMessage(), $event->getStatusCode());

+ 1
- 1
apps/dav/lib/connector/sabre/lockplugin.php View File

@@ -19,7 +19,7 @@
*
*/

namespace OC\Connector\Sabre;
namespace OCA\DAV\Connector\Sabre;

use OCA\DAV\Connector\Sabre\Exception\FileLocked;
use OCA\DAV\Connector\Sabre\Node;

Loading…
Cancel
Save