From 1b935a22ce5f4aef6d9a8f6ecb9143c95f988bf1 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Fri, 27 Apr 2012 10:23:29 +0200 Subject: add old webdav file --- files/webdav.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 files/webdav.php (limited to 'files') diff --git a/files/webdav.php b/files/webdav.php new file mode 100644 index 00000000000..3ed687041ca --- /dev/null +++ b/files/webdav.php @@ -0,0 +1,52 @@ +. + * + */ + +// Do not load FS ... +$RUNTIME_NOSETUPFS = true; +require_once('../lib/base.php'); + +// only need filesystem apps +$RUNTIME_APPTYPES=array('filesystem','authentication'); + + + +// Backends +$authBackend = new OC_Connector_Sabre_Auth(); +$lockBackend = new OC_Connector_Sabre_Locks(); + +// Create ownCloud Dir +$publicDir = new OC_Connector_Sabre_Directory(''); + +// Fire up server +$server = new Sabre_DAV_Server($publicDir); +$server->setBaseUri(OC::$WEBROOT.'/files/webdav.php'); + +// Load plugins +$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); +$server->addPlugin(new Sabre_DAV_Locks_Plugin($lockBackend)); +$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload + +// And off we go! +$server->exec(); -- cgit v1.2.3