diff options
author | Mario <mario@mariovavti.com> | 2022-11-29 10:00:07 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-11-29 10:00:07 +0000 |
commit | 4002531b9296f764c20da2f50ff1bb5feef6dccb (patch) | |
tree | 82cffba2580e78d32202d4542f59c2ba8c2fbf23 /Zotlabs/Module/Pubstream.php | |
parent | 004d0f074dfb72c7ab01e950620e97698dd51913 (diff) | |
download | volse-hubzilla-4002531b9296f764c20da2f50ff1bb5feef6dccb.tar.gz volse-hubzilla-4002531b9296f764c20da2f50ff1bb5feef6dccb.tar.bz2 volse-hubzilla-4002531b9296f764c20da2f50ff1bb5feef6dccb.zip |
fix issue where site_firehose setting was always false
Diffstat (limited to 'Zotlabs/Module/Pubstream.php')
-rw-r--r-- | Zotlabs/Module/Pubstream.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php index 3c8dfa0a5..47da3c13a 100644 --- a/Zotlabs/Module/Pubstream.php +++ b/Zotlabs/Module/Pubstream.php @@ -12,6 +12,7 @@ class Pubstream extends \Zotlabs\Web\Controller { function get($update = 0, $load = false) { + if(local_channel()) { if(! Apps::system_app_installed(local_channel(), 'Public Stream')) { //Do not display any associated widgets at this point @@ -31,16 +32,13 @@ class Pubstream extends \Zotlabs\Web\Controller { } } - $site_firehose = ((intval(get_config('system','site_firehose',0))) ? true : false); $net_firehose = ((get_config('system','disable_discover_tab',1)) ? false : true); - if(! ($site_firehose || $net_firehose)) { + if(!$net_firehose) { return ''; } - if($net_firehose) { - $site_firehose = false; - } + $site_firehose = ((intval(get_config('system','site_firehose',0))) ? true : false); $mid = ((x($_REQUEST, 'mid')) ? unpack_link_id($_REQUEST['mid']) : ''); if ($mid === false) { @@ -161,13 +159,14 @@ class Pubstream extends \Zotlabs\Web\Controller { $sys = get_sys_channel(); $abook_uids = " and abook.abook_channel = " . intval($sys['channel_id']) . " "; + $sql_extra = ''; if($site_firehose) { $uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and item_wall = 1 "; } else { $uids = " and item.uid = " . intval($sys['channel_id']) . " "; - $sql_extra = item_permissions_sql($sys['channel_id']); + $sql_extra .= item_permissions_sql($sys['channel_id']); \App::$data['firehose'] = intval($sys['channel_id']); } |