]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Admin/Site.php
New option to disallow
[friendica.git] / src / Module / Admin / Site.php
index afd6e7ca75b6a4dfe934adcd88007eaf26c49eb0..d4d07b25bcb2849839846d1d61849c9084ad4737 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2023, the Friendica project
+ * @copyright Copyright (C) 2010-2024, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -92,6 +92,7 @@ class Site extends BaseAdmin
                $private_addons         = !empty($_POST['private_addons']);
                $disable_embedded       = !empty($_POST['disable_embedded']);
                $allow_users_remote_self = !empty($_POST['allow_users_remote_self']);
+               $allow_relay_channels   = !empty($_POST['allow_relay_channels']);
                $adjust_poll_frequency  = !empty($_POST['adjust_poll_frequency']);
                $min_poll_interval      = (!empty($_POST['min_poll_interval']) ? intval(trim($_POST['min_poll_interval']))                : 0);
                $explicit_content       = !empty($_POST['explicit_content']);
@@ -106,6 +107,7 @@ class Site extends BaseAdmin
                $register_notification  = !empty($_POST['register_notification']);
                $community_page_style   = (!empty($_POST['community_page_style']) ? intval(trim($_POST['community_page_style'])) : 0);
                $max_author_posts_community_page = (!empty($_POST['max_author_posts_community_page']) ? intval(trim($_POST['max_author_posts_community_page'])) : 0);
+               $max_server_posts_community_page = (!empty($_POST['max_server_posts_community_page']) ? intval(trim($_POST['max_server_posts_community_page'])) : 0);
 
                $verifyssl              = !empty($_POST['verifyssl']);
                $proxyuser              = (!empty($_POST['proxyuser'])              ? trim($_POST['proxyuser']) : '');
@@ -261,6 +263,7 @@ class Site extends BaseAdmin
                $transactionConfig->set('system', 'enotify_no_content'     , $enotify_no_content);
                $transactionConfig->set('system', 'disable_embedded'       , $disable_embedded);
                $transactionConfig->set('system', 'allow_users_remote_self', $allow_users_remote_self);
+               $transactionConfig->set('system', 'allow_relay_channels'   , $allow_relay_channels);
                $transactionConfig->set('system', 'adjust_poll_frequency'  , $adjust_poll_frequency);
                $transactionConfig->set('system', 'min_poll_interval'      , $min_poll_interval);
                $transactionConfig->set('system', 'explicit_content'       , $explicit_content);
@@ -276,6 +279,7 @@ class Site extends BaseAdmin
                $transactionConfig->set('system', 'register_notification'  , $register_notification);
                $transactionConfig->set('system', 'community_page_style'   , $community_page_style);
                $transactionConfig->set('system', 'max_author_posts_community_page', $max_author_posts_community_page);
+               $transactionConfig->set('system', 'max_server_posts_community_page', $max_server_posts_community_page);
                $transactionConfig->set('system', 'verifyssl'              , $verifyssl);
                $transactionConfig->set('system', 'proxyuser'              , $proxyuser);
                $transactionConfig->set('system', 'proxy'                  , $proxy);
@@ -512,6 +516,7 @@ class Site extends BaseAdmin
                        '$blocked_tags'           => ['blocked_tags', DI::l10n()->t('Blocked tags for trending tags'), DI::config()->get('system', 'blocked_tags'), DI::l10n()->t("Comma separated list of hashtags that shouldn't be displayed in the trending tags.")],
                        '$cache_contact_avatar'   => ['cache_contact_avatar', DI::l10n()->t('Cache contact avatars'), DI::config()->get('system', 'cache_contact_avatar'), DI::l10n()->t('Locally store the avatar pictures of the contacts. This uses a lot of storage space but it increases the performance.')],
                        '$allow_users_remote_self'=> ['allow_users_remote_self', DI::l10n()->t('Allow Users to set remote_self'), DI::config()->get('system', 'allow_users_remote_self'), DI::l10n()->t('With checking this, every user is allowed to mark every contact as a remote_self in the repair contact dialog. Setting this flag on a contact causes mirroring every posting of that contact in the users stream.')],
+                       '$allow_relay_channels'   => ['allow_relay_channels', DI::l10n()->t('Allow Users to set up relay channels'), DI::config()->get('system', 'allow_relay_channels'), DI::l10n()->t('If enabled, it is possible to create relay users that are used to reshare content based on user defined channels.')],
                        '$adjust_poll_frequency'  => ['adjust_poll_frequency', DI::l10n()->t('Adjust the feed poll frequency'), DI::config()->get('system', 'adjust_poll_frequency'), DI::l10n()->t('Automatically detect and set the best feed poll frequency.')],
                        '$min_poll_interval'      => ['min_poll_interval', DI::l10n()->t('Minimum poll interval'), DI::config()->get('system', 'min_poll_interval'), DI::l10n()->t('Minimal distance in minutes between two polls for mail and feed contacts. Reasonable values are between 1 and 59.')],
                        '$enable_multi_reg'       => ['enable_multi_reg', DI::l10n()->t('Enable multiple registrations'), !DI::config()->get('system', 'block_extended_register'), DI::l10n()->t('Enable users to register additional accounts for use as pages.')],
@@ -519,7 +524,8 @@ class Site extends BaseAdmin
                        '$enable_regfullname'     => ['enable_regfullname', DI::l10n()->t('Enable full name check'), !DI::config()->get('system', 'no_regfullname'), DI::l10n()->t('Prevents users from registering with a display name with fewer than two parts separated by spaces.')],
                        '$register_notification'  => ['register_notification', DI::l10n()->t('Email administrators on new registration'), DI::config()->get('system', 'register_notification'), DI::l10n()->t('If enabled and the system is set to an open registration, an email for each new registration is sent to the administrators.')],
                        '$community_page_style'   => ['community_page_style', DI::l10n()->t('Community pages for visitors'), DI::config()->get('system', 'community_page_style'), DI::l10n()->t('Which community pages should be available for visitors. Local users always see both pages.'), $community_page_style_choices],
-                       '$max_author_posts_community_page' => ['max_author_posts_community_page', DI::l10n()->t('Posts per user on community page'), DI::config()->get('system', 'max_author_posts_community_page'), DI::l10n()->t('The maximum number of posts per user on the community page. (Not valid for "Global Community")')],
+                       '$max_author_posts_community_page' => ['max_author_posts_community_page', DI::l10n()->t('Posts per user on community page'), DI::config()->get('system', 'max_author_posts_community_page'), DI::l10n()->t('The maximum number of posts per user on the local community page. This is useful, when a single user floods the local community page.')],
+                       '$max_server_posts_community_page' => ['max_server_posts_community_page', DI::l10n()->t('Posts per server on community page'), DI::config()->get('system', 'max_server_posts_community_page'), DI::l10n()->t('The maximum number of posts per server on the global community page. This is useful, when posts from a single server flood the global community page.')],
                        '$mail_able'              => function_exists('imap_open'),
                        '$mail_enabled'           => ['mail_enabled', DI::l10n()->t('Enable Mail support'), !DI::config()->get('system', 'imap_disabled', !function_exists('imap_open')), DI::l10n()->t('Enable built-in mail support to poll IMAP folders and to reply via mail.')],
                        '$mail_not_able'          => DI::l10n()->t('Mail support can\'t be enabled because the PHP IMAP module is not installed.'),