diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php index a84216b61b..9c7b9ab6d5 100644 --- a/apps/files/appinfo/remote.php +++ b/apps/files/appinfo/remote.php @@ -23,7 +23,7 @@ * */ // only need filesystem apps -$RUNTIME_APPTYPES=array('filesystem','authentication'); +$RUNTIME_APPTYPES=array('filesystem', 'authentication'); OC_App::loadApps($RUNTIME_APPTYPES); // Backends @@ -38,7 +38,7 @@ $server = new Sabre_DAV_Server($publicDir); $server->setBaseUri($baseuri); // Load plugins -$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); +$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 diff --git a/files/webdav.php b/files/webdav.php index e7292d5a19..87dd019196 100644 --- a/files/webdav.php +++ b/files/webdav.php @@ -24,24 +24,7 @@ */ // only need filesystem apps -$RUNTIME_APPTYPES=array('filesystem','authentication'); +$RUNTIME_APPTYPES=array('filesystem', 'authentication'); require_once '../lib/base.php'; - -// 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(); +$baseuri = OC::$WEBROOT. '/files/webdav.php'; +require_once 'apps/files/appinfo/remote.php';