]> git.mxchange.org Git - friendica.git/blobdiff - mod/settings.php
Improved description
[friendica.git] / mod / settings.php
index fcc2cad36950f9b0a196be293489e047653f49ec..8b5254976d70fbbe0482d8ae400d532dbcebaac9 100644 (file)
@@ -327,17 +327,17 @@ function settings_post(App $a)
        if (($a->argc > 1) && ($a->argv[1] === 'display')) {
                BaseModule::checkFormSecurityTokenRedirectOnError('/settings/display', 'settings_display');
 
-               $theme             = !empty($_POST['theme'])             ? Strings::escapeTags(trim($_POST['theme']))        : $a->user['theme'];
-               $mobile_theme      = !empty($_POST['mobile_theme'])      ? Strings::escapeTags(trim($_POST['mobile_theme'])) : '';
-               $nosmile           = !empty($_POST['nosmile'])           ? intval($_POST['nosmile'])            : 0;
-               $first_day_of_week = !empty($_POST['first_day_of_week']) ? intval($_POST['first_day_of_week'])  : 0;
-               $noinfo            = !empty($_POST['noinfo'])            ? intval($_POST['noinfo'])             : 0;
-               $infinite_scroll   = !empty($_POST['infinite_scroll'])   ? intval($_POST['infinite_scroll'])    : 0;
-               $no_auto_update    = !empty($_POST['no_auto_update'])    ? intval($_POST['no_auto_update'])     : 0;
-               $bandwidth_saver   = !empty($_POST['bandwidth_saver'])   ? intval($_POST['bandwidth_saver'])    : 0;
-               $smart_threading   = !empty($_POST['smart_threading'])   ? intval($_POST['smart_threading'])    : 0;
-               $nowarn_insecure   = !empty($_POST['nowarn_insecure'])   ? intval($_POST['nowarn_insecure'])    : 0;
-               $browser_update    = !empty($_POST['browser_update'])    ? intval($_POST['browser_update'])     : 0;
+               $theme              = !empty($_POST['theme'])              ? Strings::escapeTags(trim($_POST['theme']))        : $a->user['theme'];
+               $mobile_theme       = !empty($_POST['mobile_theme'])       ? Strings::escapeTags(trim($_POST['mobile_theme'])) : '';
+               $nosmile            = !empty($_POST['nosmile'])            ? intval($_POST['nosmile'])            : 0;
+               $first_day_of_week  = !empty($_POST['first_day_of_week'])  ? intval($_POST['first_day_of_week'])  : 0;
+               $noinfo             = !empty($_POST['noinfo'])             ? intval($_POST['noinfo'])             : 0;
+               $infinite_scroll    = !empty($_POST['infinite_scroll'])    ? intval($_POST['infinite_scroll'])    : 0;
+               $no_auto_update     = !empty($_POST['no_auto_update'])     ? intval($_POST['no_auto_update'])     : 0;
+               $bandwidth_saver    = !empty($_POST['bandwidth_saver'])    ? intval($_POST['bandwidth_saver'])    : 0;
+               $no_smart_threading = !empty($_POST['no_smart_threading']) ? intval($_POST['no_smart_threading']) : 0;
+               $nowarn_insecure    = !empty($_POST['nowarn_insecure'])    ? intval($_POST['nowarn_insecure'])    : 0;
+               $browser_update     = !empty($_POST['browser_update'])     ? intval($_POST['browser_update'])     : 0;
                if ($browser_update != -1) {
                        $browser_update = $browser_update * 1000;
                        if ($browser_update < 10000) {
@@ -368,7 +368,7 @@ function settings_post(App $a)
                PConfig::set(local_user(), 'system', 'infinite_scroll'         , $infinite_scroll);
                PConfig::set(local_user(), 'system', 'no_auto_update'          , $no_auto_update);
                PConfig::set(local_user(), 'system', 'bandwidth_saver'         , $bandwidth_saver);
-               PConfig::set(local_user(), 'system', 'smart_threading'         , $smart_threading);
+               PConfig::set(local_user(), 'system', 'no_smart_threading'      , $no_smart_threading);
 
                if (in_array($theme, Theme::getAllowedList())) {
                        if ($theme == $a->user['theme']) {
@@ -829,7 +829,13 @@ function settings_content(App $a)
 
                $tpl = Renderer::getMarkupTemplate('settings/connectors.tpl');
 
-               $mail_disabled_message = (($mail_disabled) ? L10n::t('Email access is disabled on this site.') : '');
+               $mail_disabled_message = ($mail_disabled ? L10n::t('Email access is disabled on this site.') : '');
+
+               $ssl_options = ['TLS' => 'TLS', 'SSL' => 'SSL'];
+
+               if (Config::get('system', 'insecure_imap')) {
+                       $ssl_options['notls'] = L10n::t('None');
+               }
 
                $o .= Renderer::replaceMacros($tpl, [
                        '$form_security_token' => BaseModule::getFormSecurityToken("settings_connectors"),
@@ -857,15 +863,15 @@ function settings_content(App $a)
                        '$imap_desc' => L10n::t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."),
                        '$imap_lastcheck' => ['imap_lastcheck', L10n::t('Last successful email check:'), $mail_chk, ''],
                        '$mail_disabled' => $mail_disabled_message,
-                       '$mail_server'  => ['mail_server',  L10n::t('IMAP server name:'), $mail_server, ''],
-                       '$mail_port'    => ['mail_port',         L10n::t('IMAP port:'), $mail_port, ''],
-                       '$mail_ssl'             => ['mail_ssl',          L10n::t('Security:'), strtoupper($mail_ssl), '', ['notls'=>L10n::t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL']],
-                       '$mail_user'    => ['mail_user',    L10n::t('Email login name:'), $mail_user, ''],
-                       '$mail_pass'    => ['mail_pass',         L10n::t('Email password:'), '', ''],
-                       '$mail_replyto' => ['mail_replyto', L10n::t('Reply-to address:'), $mail_replyto, 'Optional'],
-                       '$mail_pubmail' => ['mail_pubmail', L10n::t('Send public posts to all email contacts:'), $mail_pubmail, ''],
-                       '$mail_action'  => ['mail_action',       L10n::t('Action after import:'), $mail_action, '', [0=>L10n::t('None'), /*1=>L10n::t('Delete'),*/ 2=>L10n::t('Mark as seen'), 3=>L10n::t('Move to folder')]],
-                       '$mail_movetofolder'    => ['mail_movetofolder',         L10n::t('Move to folder:'), $mail_movetofolder, ''],
+                       '$mail_server'  => ['mail_server',      L10n::t('IMAP server name:'), $mail_server, ''],
+                       '$mail_port'    => ['mail_port',        L10n::t('IMAP port:'), $mail_port, ''],
+                       '$mail_ssl'     => ['mail_ssl',         L10n::t('Security:'), strtoupper($mail_ssl), '', $ssl_options],
+                       '$mail_user'    => ['mail_user',        L10n::t('Email login name:'), $mail_user, ''],
+                       '$mail_pass'    => ['mail_pass',        L10n::t('Email password:'), '', ''],
+                       '$mail_replyto' => ['mail_replyto',     L10n::t('Reply-to address:'), $mail_replyto, 'Optional'],
+                       '$mail_pubmail' => ['mail_pubmail',     L10n::t('Send public posts to all email contacts:'), $mail_pubmail, ''],
+                       '$mail_action'  => ['mail_action',      L10n::t('Action after import:'), $mail_action, '', [0 => L10n::t('None'), 1 => L10n::t('Delete'), 2 => L10n::t('Mark as seen'), 3 => L10n::t('Move to folder')]],
+                       '$mail_movetofolder' => ['mail_movetofolder', L10n::t('Move to folder:'), $mail_movetofolder, ''],
                        '$submit' => L10n::t('Save Settings'),
                ]);
 
@@ -933,7 +939,7 @@ function settings_content(App $a)
                $infinite_scroll = PConfig::get(local_user(), 'system', 'infinite_scroll', 0);
                $no_auto_update = PConfig::get(local_user(), 'system', 'no_auto_update', 0);
                $bandwidth_saver = PConfig::get(local_user(), 'system', 'bandwidth_saver', 0);
-               $smart_threading = PConfig::get(local_user(), 'system', 'smart_threading', 0);
+               $no_smart_threading = PConfig::get(local_user(), 'system', 'no_smart_threading', 0);
 
                $theme_config = "";
                if (($themeconfigfile = get_theme_config_file($theme_selected)) !== null) {
@@ -962,7 +968,7 @@ function settings_content(App $a)
                        '$infinite_scroll'      => ['infinite_scroll', L10n::t("Infinite scroll"), $infinite_scroll, ''],
                        '$no_auto_update'       => ['no_auto_update', L10n::t("Automatic updates only at the top of the network page"), $no_auto_update, L10n::t('When disabled, the network page is updated all the time, which could be confusing while reading.')],
                        '$bandwidth_saver' => ['bandwidth_saver', L10n::t('Bandwidth Saver Mode'), $bandwidth_saver, L10n::t('When enabled, embedded content is not displayed on automatic updates, they only show on page reload.')],
-                       '$smart_threading' => ['smart_threading', L10n::t('Smart Threading'), $smart_threading, L10n::t('When enabled, suppress extraneous thread indentation while keeping it where it matters. Only works if threading is available and enabled.')],
+                       '$no_smart_threading' => ['no_smart_threading', L10n::t('Disable Smart Threading'), $no_smart_threading, L10n::t('Disable the automatic suppression of extraneous thread indentation.')],
 
                        '$d_tset' => L10n::t('General Theme Settings'),
                        '$d_ctset' => L10n::t('Custom Theme Settings'),
@@ -1200,7 +1206,7 @@ function settings_content(App $a)
                '$permissions' => L10n::t('Default Post Permissions'),
                '$permdesc' => L10n::t("\x28click to open/close\x29"),
                '$visibility' => $profile['net-publish'],
-               '$aclselect' => ACL::getFullSelectorHTML($a->user),
+               '$aclselect' => ACL::getFullSelectorHTML($a->page, $a->user),
                '$suggestme' => $suggestme,
                '$blockwall'=> $blockwall, // array('blockwall', L10n::t('Allow friends to post to your profile page:'), !$blockwall, ''),
                '$blocktags'=> $blocktags, // array('blocktags', L10n::t('Allow friends to tag your posts:'), !$blocktags, ''),