]> git.mxchange.org Git - friendica.git/blobdiff - mod/settings.php
Only perform OAuth when no login data are provided
[friendica.git] / mod / settings.php
index 1d1caa6f8ea0969097d3e38e35d93c42d8a818e9..9a73b83e6bf6b412d37754fdf317650f0bf16f8e 100644 (file)
@@ -27,7 +27,6 @@ use Friendica\Core\ACL;
 use Friendica\Core\Hook;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
-use Friendica\Core\Theme;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
 use Friendica\DI;
@@ -319,6 +318,7 @@ function settings_post(App $a)
        $cntunkmail       = (!empty($_POST['cntunkmail']) ? intval($_POST['cntunkmail']) : 0);
        $hide_friends     = (($_POST['hide-friends'] == 1) ? 1: 0);
        $hidewall         = (($_POST['hidewall'] == 1) ? 1: 0);
+       $unlisted         = (($_POST['unlisted'] == 1) ? 1: 0);
 
        $email_textonly   = (($_POST['email_textonly'] == 1) ? 1 : 0);
        $detailed_notif   = (($_POST['detailed_notif'] == 1) ? 1 : 0);
@@ -416,6 +416,7 @@ function settings_post(App $a)
 
        DI::pConfig()->set(local_user(), 'system', 'email_textonly', $email_textonly);
        DI::pConfig()->set(local_user(), 'system', 'detailed_notif', $detailed_notif);
+       DI::pConfig()->set(local_user(), 'system', 'unlisted', $unlisted);
 
        if ($page_flags == User::PAGE_FLAGS_PRVGROUP) {
                $hidewall = 1;
@@ -599,7 +600,7 @@ function settings_content(App $a)
                        $arr[$fname] = [];
                        $arr[$fname][0] = $fdata[0];
                        foreach (array_slice($fdata,1) as $f) {
-                               $arr[$fname][1][] = ['feature_' .$f[0], $f[1],((intval(Feature::isEnabled(local_user(), $f[0]))) ? "1" : ''), $f[2],[DI::l10n()->t('Off'), DI::l10n()->t('On')]];
+                               $arr[$fname][1][] = ['feature_' . $f[0], $f[1], Feature::isEnabled(local_user(), $f[0]), $f[2]];
                        }
                }
 
@@ -838,6 +839,10 @@ function settings_content(App $a)
                '$field' => ['hidewall', DI::l10n()->t('Hide your profile details from anonymous viewers?'), $a->user['hidewall'], DI::l10n()->t('Anonymous visitors will only see your profile picture, your display name and the nickname you are using on your profile page. Your public posts and replies will still be accessible by other means.')],
        ]);
 
+       $unlisted = Renderer::replaceMacros($opt_tpl, [
+               '$field' => ['unlisted', DI::l10n()->t('Make public posts unlisted'), DI::pConfig()->get(local_user(), 'system', 'unlisted'), DI::l10n()->t('Your public posts will not appear on the community pages or in search results, nor be sent to relay servers. However they can still appear on public feeds on remote servers.')],
+       ]);
+
        $blockwall = Renderer::replaceMacros($opt_tpl, [
                '$field' => ['blockwall', DI::l10n()->t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), DI::l10n()->t('Your contacts may write posts on your profile wall. These posts will be distributed to your contacts')],
        ]);
@@ -951,6 +956,7 @@ function settings_content(App $a)
                '$profile_in_net_dir' => $profile_in_net_dir,
                '$hide_friends' => $hide_friends,
                '$hide_wall' => $hide_wall,
+               '$unlisted' => $unlisted,
                '$unkmail' => $unkmail,
                '$cntunkmail'   => ['cntunkmail', DI::l10n()->t('Maximum private messages per day from unknown people:'), $cntunkmail , DI::l10n()->t("\x28to prevent spam abuse\x29")],