diff options
author | Mario <mario@mariovavti.com> | 2017-12-03 12:31:41 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2017-12-03 12:31:41 +0100 |
commit | dae0107dd0e1caa460866b5debdc6de912bfd819 (patch) | |
tree | 96ec8614c5629d49b7d78186a92d44eb9d31b98c /Zotlabs | |
parent | dd2c4c37ff03eef6470ef0364217b2c6208c38c0 (diff) | |
download | volse-hubzilla-dae0107dd0e1caa460866b5debdc6de912bfd819.tar.gz volse-hubzilla-dae0107dd0e1caa460866b5debdc6de912bfd819.tar.bz2 volse-hubzilla-dae0107dd0e1caa460866b5debdc6de912bfd819.zip |
fix some pubstream on/off weirdness
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Apps.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Admin/Site.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Ping.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Settings/Channel.php | 6 |
4 files changed, 7 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 9271cee85..457b85b62 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -352,7 +352,7 @@ class Apps { break; default: if($config) - $unset = ((get_config('system', $require[0]) == $require[1]) ? false : true); + $unset = ((get_config('system', $require[0]) === $require[1]) ? false : true); else $unset = ((local_channel() && feature_enabled(local_channel(),$require)) ? false : true); if($unset) diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php index eda97b591..a9db1ad55 100644 --- a/Zotlabs/Module/Admin/Site.php +++ b/Zotlabs/Module/Admin/Site.php @@ -251,6 +251,7 @@ class Site { ); $discover_tab = get_config('system','disable_discover_tab'); + // $disable public streams by default if($discover_tab === false) $discover_tab = 1; diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index 84f9d2a21..c1bce0d51 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -140,7 +140,7 @@ class Ping extends \Zotlabs\Web\Controller { db_utcnow(), db_quoteinterval('3 MINUTE') ); - $discover_tab_on = ((get_config('system','disable_discover_tab') != 1) ? true : false); + $discover_tab_on = ((get_config('system','disable_discover_tab') || get_config('system','disable_discover_tab') === false) ? false : true); $notify_pubs = ((local_channel()) ? ($vnotify & VNOTIFY_PUBS) && $discover_tab_on : $discover_tab_on); if($notify_pubs) { diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php index db0f79060..5e9e88a6d 100644 --- a/Zotlabs/Module/Settings/Channel.php +++ b/Zotlabs/Module/Settings/Channel.php @@ -206,7 +206,7 @@ class Channel { $vnotify += intval($_POST['vnotify11']); if(x($_POST,'vnotify12')) $vnotify += intval($_POST['vnotify12']); - if(x($_POST,'vnotify13') && (get_config('system', 'disable_discover_tab') != 1)) + if(x($_POST,'vnotify13')) $vnotify += intval($_POST['vnotify13']); $always_show_in_notices = x($_POST,'always_show_in_notices') ? 1 : 0; @@ -481,6 +481,8 @@ class Channel { $plugin = [ 'basic' => '', 'security' => '', 'notify' => '', 'misc' => '' ]; call_hooks('channel_settings',$plugin); + $disable_discover_tab = get_config('system','disable_discover_tab') || get_config('system','disable_discover_tab') === false; + $o .= replace_macros($stpl,array( '$ptitle' => t('Channel Settings'), @@ -570,7 +572,7 @@ class Channel { '$vnotify10' => array('vnotify10', t('New connections'), ($vnotify & VNOTIFY_INTRO), VNOTIFY_INTRO, t('Recommended'), $yes_no), '$vnotify11' => array('vnotify11', t('System Registrations'), ($vnotify & VNOTIFY_REGISTER), VNOTIFY_REGISTER, '', $yes_no), '$vnotify12' => array('vnotify12', t('Unseen shared files'), ($vnotify & VNOTIFY_FILES), VNOTIFY_FILES, '', $yes_no), - '$vnotify13' => ((get_config('system', 'disable_discover_tab') != 1) ? array('vnotify13', t('Unseen public activity'), ($vnotify & VNOTIFY_PUBS), VNOTIFY_PUBS, '', $yes_no) : array()), + '$vnotify13' => (($disable_discover_tab) ? array() : array('vnotify13', t('Unseen public activity'), ($vnotify & VNOTIFY_PUBS), VNOTIFY_PUBS, '', $yes_no)), '$mailhost' => [ 'mailhost', t('Email notification hub (hostname)'), get_pconfig(local_channel(),'system','email_notify_host',\App::get_hostname()), sprintf( t('If your channel is mirrored to multiple hubs, set this to your preferred location. This will prevent duplicate email notifications. Example: %s'),\App::get_hostname()) ], '$always_show_in_notices' => array('always_show_in_notices', t('Also show new wall posts, private messages and connections under Notices'), $always_show_in_notices, 1, '', $yes_no), |