aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-19 00:06:10 -0800
committerredmatrix <git@macgirvin.com>2016-02-19 00:06:10 -0800
commit28d07fd6b2b48632edadc94055c1be8a0cb11274 (patch)
tree3f32eb951b3a3fae05ae7be1566d66a1293b1339 /include
parent5a7b994e59306519574ce7aaa004f08d7d47ee05 (diff)
downloadvolse-hubzilla-28d07fd6b2b48632edadc94055c1be8a0cb11274.tar.gz
volse-hubzilla-28d07fd6b2b48632edadc94055c1be8a0cb11274.tar.bz2
volse-hubzilla-28d07fd6b2b48632edadc94055c1be8a0cb11274.zip
move storage assets to zotlabs/storage
Diffstat (limited to 'include')
-rw-r--r--include/network.php4
-rw-r--r--include/reddav.php22
2 files changed, 13 insertions, 13 deletions
diff --git a/include/network.php b/include/network.php
index aa6b54945..ecaf4e05f 100644
--- a/include/network.php
+++ b/include/network.php
@@ -294,8 +294,8 @@ function z_post_url_json($url, $params, $redirects = 0, $opts = array()) {
}
-function json_return_and_die($x) {
- header("content-type: application/json");
+function json_return_and_die($x, $content_type = 'application/json') {
+ header("Content-type: $content_type");
echo json_encode($x);
killme();
}
diff --git a/include/reddav.php b/include/reddav.php
index c592597a9..835521757 100644
--- a/include/reddav.php
+++ b/include/reddav.php
@@ -19,13 +19,13 @@
*/
use Sabre\DAV;
-use RedMatrix\RedDAV;
+use Zotlabs\Storage;
require_once('vendor/autoload.php');
require_once('include/attach.php');
-require_once('include/RedDAV/RedFile.php');
-require_once('include/RedDAV/RedDirectory.php');
-require_once('include/RedDAV/RedBasicAuth.php');
+require_once('Zotlabs/Storage/File.php');
+require_once('Zotlabs/Storage/Directory.php');
+require_once('Zotlabs/Storage/BasicAuth.php');
/**
* @brief Returns an array with viewable channels.
@@ -51,7 +51,7 @@ function RedChannelList(&$auth) {
if (perm_is_allowed($rr['channel_id'], $auth->observer, 'view_storage')) {
logger('found channel: /cloud/' . $rr['channel_address'], LOGGER_DATA);
// @todo can't we drop '/cloud'? It gets stripped off anyway in RedDirectory
- $ret[] = new RedDAV\RedDirectory('/cloud/' . $rr['channel_address'], $auth);
+ $ret[] = new Zotlabs\Storage\Directory('/cloud/' . $rr['channel_address'], $auth);
}
}
}
@@ -167,9 +167,9 @@ function RedCollectionData($file, &$auth) {
foreach ($r as $rr) {
//logger('filename: ' . $rr['filename'], LOGGER_DEBUG);
if (intval($rr['is_dir'])) {
- $ret[] = new RedDAV\RedDirectory($path . '/' . $rr['filename'], $auth);
+ $ret[] = new Zotlabs\Storage\Directory($path . '/' . $rr['filename'], $auth);
} else {
- $ret[] = new RedDAV\RedFile($path . '/' . $rr['filename'], $rr, $auth);
+ $ret[] = new Zotlabs\Storage\File($path . '/' . $rr['filename'], $rr, $auth);
}
}
@@ -204,7 +204,7 @@ function RedFileData($file, &$auth, $test = false) {
if ((! $file) || ($file === '/')) {
- return new RedDAV\RedDirectory('/', $auth);
+ return new Zotlabs\Storage\Directory('/', $auth);
}
$file = trim($file, '/');
@@ -274,7 +274,7 @@ function RedFileData($file, &$auth, $test = false) {
if ($test)
return true;
// final component was a directory.
- return new RedDAV\RedDirectory($file, $auth);
+ return new Zotlabs\Storage\Directory($file, $auth);
}
if ($errors) {
@@ -293,9 +293,9 @@ function RedFileData($file, &$auth, $test = false) {
return true;
if (intval($r[0]['is_dir'])) {
- return new RedDAV\RedDirectory($path . '/' . $r[0]['filename'], $auth);
+ return new Zotlabs\Storage\Directory($path . '/' . $r[0]['filename'], $auth);
} else {
- return new RedDAV\RedFile($path . '/' . $r[0]['filename'], $r[0], $auth);
+ return new Zotlabs\Storage\File($path . '/' . $r[0]['filename'], $r[0], $auth);
}
}
return false;