aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dav.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/dav.php')
-rw-r--r--mod/dav.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/mod/dav.php b/mod/dav.php
index d4695a544..e2a857dca 100644
--- a/mod/dav.php
+++ b/mod/dav.php
@@ -7,7 +7,7 @@
*/
use Sabre\DAV;
-use RedMatrix\RedDAV;
+use Zotlabs\Storage;
// composer autoloader for SabreDAV
require_once('vendor/autoload.php');
@@ -49,18 +49,18 @@ function dav_init(&$a) {
$profile = 0;
- $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/feed/' . $which . '" />' . "\r\n";
+ App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which . '" />' . "\r\n";
if ($which)
profile_load($a, $which, $profile);
- $auth = new RedDAV\RedBasicAuth();
+ $auth = new Zotlabs\Storage\BasicAuth();
$ob_hash = get_observer_hash();
if ($ob_hash) {
if (local_channel()) {
- $channel = $a->get_channel();
+ $channel = App::get_channel();
$auth->setCurrentUser($channel['channel_address']);
$auth->channel_id = $channel['channel_id'];
$auth->channel_hash = $channel['channel_hash'];
@@ -82,7 +82,7 @@ function dav_init(&$a) {
$_SERVER['REQUEST_URI'] = strip_zids($_SERVER['REQUEST_URI']);
$_SERVER['REQUEST_URI'] = preg_replace('/[\?&]davguest=(.*?)([\?&]|$)/ism', '', $_SERVER['REQUEST_URI']);
- $rootDirectory = new RedDAV\RedDirectory('/', $auth);
+ $rootDirectory = new Zotlabs\Storage\Directory('/', $auth);
// A SabreDAV server-object
$server = new DAV\Server($rootDirectory);
@@ -107,8 +107,8 @@ function dav_init(&$a) {
if ((! $auth->observer) && ($_SERVER['REQUEST_METHOD'] === 'GET')) {
try {
- $x = RedFileData('/' . $a->cmd, $auth);
- if($x instanceof RedDAV\RedFile)
+ $x = RedFileData('/' . App::$cmd, $auth);
+ if($x instanceof Zotlabs\Storage\File)
$isapublic_file = true;
}
catch (Exception $e) {
@@ -126,14 +126,14 @@ function dav_init(&$a) {
}
}
- require_once('include/RedDAV/RedBrowser.php');
+// require_once('Zotlabs/Storage/Browser.php');
// provide a directory view for the cloud in Hubzilla
- $browser = new RedDAV\RedBrowser($auth);
+ $browser = new Zotlabs\Storage\Browser($auth);
$auth->setBrowserPlugin($browser);
// Experimental QuotaPlugin
-// require_once('include/RedDAV/QuotaPlugin.php');
-// $server->addPlugin(new RedDAV\QuotaPlugin($auth));
+// require_once('Zotlabs/Storage/QuotaPlugin.php');
+// $server->addPlugin(new Zotlabs\Storage\QuotaPlugin($auth));
// All we need to do now, is to fire up the server
$server->exec();