From 7ad4a8ca93675f48ec314c34641387e0e632ae2d Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 20 Nov 2016 12:09:18 +0000 Subject: [PATCH] The warning if a group contains members of several network types can now be supressed. --- mod/network.php | 8 ++++---- mod/settings.php | 5 +++++ view/templates/settings_display.tpl | 1 + view/theme/frio/templates/settings_display.tpl | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mod/network.php b/mod/network.php index ec44b8e5a..10a190195 100644 --- a/mod/network.php +++ b/mod/network.php @@ -395,10 +395,10 @@ function network_content(&$a, $update = 0) { if($group) { if(($t = group_public_members($group)) && (! get_pconfig(local_user(),'system','nowarn_insecure'))) { - notice( sprintf( tt('Warning: This group contains %s member from an insecure network.', - 'Warning: This group contains %s members from an insecure network.', - $t), $t ) . EOL); - notice( t('Private messages to this group are at risk of public disclosure.') . EOL); + notice(sprintf(tt("Warning: This group contains %s member from a network that doesn't allow non public messages.", + "Warning: This group contains %s members from a network that doesn't allow non public messages.", + $t), $t).EOL); + notice(t("Messages in this group won't be send to these receivers.").EOL); } } diff --git a/mod/settings.php b/mod/settings.php index a20b999ed..663acd69f 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -301,6 +301,7 @@ function settings_post(&$a) { $infinite_scroll = x($_POST, 'infinite_scroll') ? intval($_POST['infinite_scroll']) : 0; $no_auto_update = x($_POST, 'no_auto_update') ? intval($_POST['no_auto_update']) : 0; $bandwidth_saver = x($_POST, 'bandwidth_saver') ? intval($_POST['bandwidth_saver']) : 0; + $nowarn_insecure = x($_POST, 'nowarn_insecure') ? intval($_POST['nowarn_insecure']) : 0; $browser_update = x($_POST, 'browser_update') ? intval($_POST['browser_update']) : 0; if ($browser_update != -1) { $browser_update = $browser_update * 1000; @@ -321,6 +322,7 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','mobile_theme',$mobile_theme); } + set_pconfig(local_user(), 'system', 'nowarn_insecure' , $nowarn_insecure); set_pconfig(local_user(), 'system', 'update_interval' , $browser_update); set_pconfig(local_user(), 'system', 'itemspage_network' , $itemspage_network); set_pconfig(local_user(), 'system', 'itemspage_mobile_network', $itemspage_mobile_network); @@ -951,6 +953,8 @@ function settings_content(&$a) { $theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']); $mobile_theme_selected = (!x($_SESSION,'mobile-theme')? $default_mobile_theme : $_SESSION['mobile-theme']); + $nowarn_insecure = intval(get_pconfig(local_user(), 'system', 'nowarn_insecure')); + $browser_update = intval(get_pconfig(local_user(), 'system','update_interval')); if (intval($browser_update) != -1) $browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds @@ -995,6 +999,7 @@ function settings_content(&$a) { '$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, true), '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false), + '$nowarn_insecure' => array('nowarn_insecure', t('Suppress warning of insecure networks'), $nowarn_insecure, t("Should the system suppress the warning that the current group contains members of networks that can't receive non public postings.")), '$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds. Enter -1 to disable it.')), '$itemspage_network' => array('itemspage_network', t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')), '$itemspage_mobile_network' => array('itemspage_mobile_network', t("Number of items to display per page when viewed from mobile device:"), $itemspage_mobile_network, t('Maximum of 100 items')), diff --git a/view/templates/settings_display.tpl b/view/templates/settings_display.tpl index d6d0a1a81..6f5a06550 100644 --- a/view/templates/settings_display.tpl +++ b/view/templates/settings_display.tpl @@ -9,6 +9,7 @@ {{include file="field_themeselect.tpl" field=$mobile_theme}} {{include file="field_input.tpl" field=$itemspage_mobile_network}} {{include file="field_input.tpl" field=$ajaxint}} +{{include file="field_checkbox.tpl" field=$nowarn_insecure}} {{include file="field_checkbox.tpl" field=$no_auto_update}} {{include file="field_checkbox.tpl" field=$nosmile}} {{include file="field_checkbox.tpl" field=$noinfo}} diff --git a/view/theme/frio/templates/settings_display.tpl b/view/theme/frio/templates/settings_display.tpl index 43eea9730..06709f304 100644 --- a/view/theme/frio/templates/settings_display.tpl +++ b/view/theme/frio/templates/settings_display.tpl @@ -66,6 +66,7 @@ {{include file="field_input.tpl" field=$itemspage_network}} {{include file="field_input.tpl" field=$itemspage_mobile_network}} {{include file="field_input.tpl" field=$ajaxint}} + {{include file="field_checkbox.tpl" field=$nowarn_insecure}} {{include file="field_checkbox.tpl" field=$no_auto_update}} {{include file="field_checkbox.tpl" field=$nosmile}} {{include file="field_checkbox.tpl" field=$noinfo}}