more fixes for /cloud and /dav
This commit is contained in:
parent
a59e84cadd
commit
227320f6f0
@ -78,17 +78,6 @@ class Cloud extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$is_readable = false;
|
$is_readable = false;
|
||||||
|
|
||||||
if($_SERVER['REQUEST_METHOD'] === 'GET') {
|
|
||||||
try {
|
|
||||||
$x = $rootDirectory->CollectionData('/' . \App::$cmd, $auth);
|
|
||||||
}
|
|
||||||
catch(\Exception $e) {
|
|
||||||
if($e instanceof Sabre\DAV\Exception\Forbidden) {
|
|
||||||
http_status_exit(401, 'Permission denied.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// provide a directory view for the cloud in Hubzilla
|
// provide a directory view for the cloud in Hubzilla
|
||||||
$browser = new \Zotlabs\Storage\Browser($auth);
|
$browser = new \Zotlabs\Storage\Browser($auth);
|
||||||
$auth->setBrowserPlugin($browser);
|
$auth->setBrowserPlugin($browser);
|
||||||
|
@ -44,8 +44,6 @@ class Dav extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once('include/reddav.php');
|
|
||||||
|
|
||||||
if (! is_dir('store'))
|
if (! is_dir('store'))
|
||||||
os_mkdir('store', STORAGE_DEFAULT_PERMISSIONS, false);
|
os_mkdir('store', STORAGE_DEFAULT_PERMISSIONS, false);
|
||||||
|
|
||||||
|
@ -206,6 +206,8 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
|||||||
throw new DAV\Exception\Forbidden('Permission denied.');
|
throw new DAV\Exception\Forbidden('Permission denied.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require_once('include/attach.php');
|
||||||
|
|
||||||
$mimetype = z_mime_content_type($name);
|
$mimetype = z_mime_content_type($name);
|
||||||
|
|
||||||
$c = q("SELECT * FROM channel WHERE channel_id = %d AND channel_removed = 0 LIMIT 1",
|
$c = q("SELECT * FROM channel WHERE channel_id = %d AND channel_removed = 0 LIMIT 1",
|
||||||
|
Reference in New Issue
Block a user