From 28d07fd6b2b48632edadc94055c1be8a0cb11274 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 19 Feb 2016 00:06:10 -0800 Subject: move storage assets to zotlabs/storage --- mod/dav.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'mod/dav.php') diff --git a/mod/dav.php b/mod/dav.php index d4695a544..fb5054d0d 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'); @@ -54,7 +54,7 @@ function dav_init(&$a) { if ($which) profile_load($a, $which, $profile); - $auth = new RedDAV\RedBasicAuth(); + $auth = new Zotlabs\Storage\BasicAuth(); $ob_hash = get_observer_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); @@ -108,7 +108,7 @@ function dav_init(&$a) { if ((! $auth->observer) && ($_SERVER['REQUEST_METHOD'] === 'GET')) { try { $x = RedFileData('/' . $a->cmd, $auth); - if($x instanceof RedDAV\RedFile) + 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(); -- cgit v1.2.3 From ca52d39abec4c3afba3d11ada38409a25f5b61e8 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 19 Feb 2016 11:58:17 -0800 Subject: finish up the storage move --- mod/dav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/dav.php') diff --git a/mod/dav.php b/mod/dav.php index fb5054d0d..272dae4c8 100644 --- a/mod/dav.php +++ b/mod/dav.php @@ -126,7 +126,7 @@ function dav_init(&$a) { } } - require_once('Zotlabs/Storage/Browser.php'); +// require_once('Zotlabs/Storage/Browser.php'); // provide a directory view for the cloud in Hubzilla $browser = new Zotlabs\Storage\Browser($auth); $auth->setBrowserPlugin($browser); -- cgit v1.2.3 From 1cd3b4182595b838a535dd6b6990251db05d49e6 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 30 Mar 2016 22:13:24 -0700 Subject: deprecate $a->get_baseurl() --- mod/dav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/dav.php') diff --git a/mod/dav.php b/mod/dav.php index 272dae4c8..b745dbb5c 100644 --- a/mod/dav.php +++ b/mod/dav.php @@ -49,7 +49,7 @@ function dav_init(&$a) { $profile = 0; - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; if ($which) profile_load($a, $which, $profile); -- cgit v1.2.3 From 9abd95fad3784a10fc48bc40f9b8a75d7d74edda Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 31 Mar 2016 16:06:03 -0700 Subject: static App --- mod/dav.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod/dav.php') diff --git a/mod/dav.php b/mod/dav.php index b745dbb5c..e2a857dca 100644 --- a/mod/dav.php +++ b/mod/dav.php @@ -49,7 +49,7 @@ function dav_init(&$a) { $profile = 0; - $a->page['htmlhead'] .= '' . "\r\n"; + App::$page['htmlhead'] .= '' . "\r\n"; if ($which) profile_load($a, $which, $profile); @@ -60,7 +60,7 @@ function dav_init(&$a) { 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']; @@ -107,7 +107,7 @@ function dav_init(&$a) { if ((! $auth->observer) && ($_SERVER['REQUEST_METHOD'] === 'GET')) { try { - $x = RedFileData('/' . $a->cmd, $auth); + $x = RedFileData('/' . App::$cmd, $auth); if($x instanceof Zotlabs\Storage\File) $isapublic_file = true; } -- cgit v1.2.3