aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Dav.php
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2016-10-02 00:41:25 +0200
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2016-10-13 11:27:23 +0200
commit7b41839ea8f2aad020444c42f2cba89040ca28b8 (patch)
treeacf1495c556a0ce82823e47ebcdfa21377f92b61 /Zotlabs/Module/Dav.php
parent6532972e61a2aa5e8517ebcca3113adb3c8f336d (diff)
downloadvolse-hubzilla-7b41839ea8f2aad020444c42f2cba89040ca28b8.tar.gz
volse-hubzilla-7b41839ea8f2aad020444c42f2cba89040ca28b8.tar.bz2
volse-hubzilla-7b41839ea8f2aad020444c42f2cba89040ca28b8.zip
[TASK] Update Doxyfile and fix Doxygen errors.
Updated Doxyfile to include new folders. Add a list for @hooks tags. Fixed some parsing problems for Doxygen.
Diffstat (limited to 'Zotlabs/Module/Dav.php')
-rw-r--r--Zotlabs/Module/Dav.php36
1 files changed, 17 insertions, 19 deletions
diff --git a/Zotlabs/Module/Dav.php b/Zotlabs/Module/Dav.php
index aaf69844c..4ab101780 100644
--- a/Zotlabs/Module/Dav.php
+++ b/Zotlabs/Module/Dav.php
@@ -1,13 +1,13 @@
<?php
-
-namespace Zotlabs\Module;
/**
- * @file mod/dav.php
+ * @file Zotlabs/Module/Dav.php
* @brief Initialize Hubzilla's cloud (SabreDAV).
*
* Module for accessing the DAV storage area from a DAV client.
*/
+namespace Zotlabs\Module;
+
use \Sabre\DAV as SDAV;
use \Zotlabs\Storage;
@@ -16,16 +16,14 @@ require_once('vendor/autoload.php');
require_once('include/attach.php');
-/**
- * @brief Fires up the SabreDAV server.
- *
- * @param App &$a
- */
-
class Dav extends \Zotlabs\Web\Controller {
+ /**
+ * @brief Fires up the SabreDAV server.
+ *
+ */
function init() {
-
+
// workaround for HTTP-auth in CGI mode
if (x($_SERVER, 'REDIRECT_REMOTE_USER')) {
$userpass = base64_decode(substr($_SERVER["REDIRECT_REMOTE_USER"], 6)) ;
@@ -47,16 +45,16 @@ class Dav extends \Zotlabs\Web\Controller {
if (! is_dir('store'))
os_mkdir('store', STORAGE_DEFAULT_PERMISSIONS, false);
-
+
if (argc() > 1)
profile_load(argv(1),0);
-
+
$auth = new \Zotlabs\Storage\BasicAuth();
$auth->setRealm(ucfirst(\Zotlabs\Lib\System::get_platform_name()) . ' ' . 'WebDAV');
$rootDirectory = new \Zotlabs\Storage\Directory('/', $auth);
-
+
// A SabreDAV server-object
$server = new SDAV\Server($rootDirectory);
@@ -68,21 +66,21 @@ class Dav extends \Zotlabs\Web\Controller {
// prevent overwriting changes each other with a lock backend
$lockBackend = new SDAV\Locks\Backend\File('store/[data]/locks');
$lockPlugin = new SDAV\Locks\Plugin($lockBackend);
-
+
$server->addPlugin($lockPlugin);
-
+
// provide a directory view for the cloud in Hubzilla
$browser = new \Zotlabs\Storage\Browser($auth);
$auth->setBrowserPlugin($browser);
-
+
// Experimental QuotaPlugin
// 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();
-
+
killme();
}
-
+
}