aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Storage/Directory.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-08-16 19:32:08 +0200
committerMario <mario@mariovavti.com>2019-08-16 19:32:08 +0200
commitea8621d6ece810479adc0cd785212d66cbe01d23 (patch)
tree32350070ec5601282afe4411486c629ce14e1a2e /Zotlabs/Storage/Directory.php
parentb325b2c003ae73c8c9869d35b15444fe9a17fd74 (diff)
parentac05a2ede7023495618b316635b93274416b69d8 (diff)
downloadvolse-hubzilla-ea8621d6ece810479adc0cd785212d66cbe01d23.tar.gz
volse-hubzilla-ea8621d6ece810479adc0cd785212d66cbe01d23.tar.bz2
volse-hubzilla-ea8621d6ece810479adc0cd785212d66cbe01d23.zip
Merge branch 'dev' into 'dev'
zot6 compatibility: when posting from a non-primary clone the actor->id is... See merge request hubzilla/core!1710
Diffstat (limited to 'Zotlabs/Storage/Directory.php')
-rw-r--r--Zotlabs/Storage/Directory.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php
index b30aecf92..ae36fc1c0 100644
--- a/Zotlabs/Storage/Directory.php
+++ b/Zotlabs/Storage/Directory.php
@@ -720,7 +720,11 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo
* @return array Directory[]
*/
function ChannelList(&$auth) {
- $ret = array();
+ $ret = [];
+
+ if (intval(get_config('system','cloud_disable_siteroot'))) {
+ return $ret;
+ }
$r = q("SELECT channel_id, channel_address, profile.publish FROM channel left join profile on profile.uid = channel.channel_id WHERE channel_removed = 0 AND channel_system = 0 AND (channel_pageflags & %d) = 0",
intval(PAGE_HIDDEN)
@@ -730,8 +734,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo
foreach ($r as $rr) {
if (perm_is_allowed($rr['channel_id'], $auth->observer, 'view_storage') && $rr['publish']) {
logger('found channel: /cloud/' . $rr['channel_address'], LOGGER_DATA);
- // @todo can't we drop '/cloud'? It gets stripped off anyway in RedDirectory
- $ret[] = new Directory('/cloud/' . $rr['channel_address'], $auth);
+ $ret[] = new Directory($rr['channel_address'], $auth);
}
}
}