X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FAdmin%2FSite.php;h=18a1cbf2a835f5d214e1731a478945c52672e492;hb=1de3960e267a8d298348fbca18cf1be1f6a20f7a;hp=5d2004ca5fbf988961e51671f9dc973671792450;hpb=774d04cd2fbdfaa36beb74b8a38b025c96184ff9;p=friendica.git diff --git a/src/Module/Admin/Site.php b/src/Module/Admin/Site.php index 5d2004ca5f..18a1cbf2a8 100644 --- a/src/Module/Admin/Site.php +++ b/src/Module/Admin/Site.php @@ -14,8 +14,8 @@ use Friendica\Module\BaseAdminModule; use Friendica\Module\Register; use Friendica\Protocol\PortableContact; use Friendica\Util\BasePath; -use Friendica\Util\BaseURL; use Friendica\Util\Strings; +use Friendica\Worker\Delivery; require_once __DIR__ . '/../../../boot.php'; @@ -99,7 +99,7 @@ class Site extends BaseAdminModule // send relocate $usersStmt = DBA::select('user', ['uid'], ['account_removed' => false, 'account_expired' => false]); while ($user = DBA::fetch($usersStmt)) { - Worker::add(PRIORITY_HIGH, 'Notifier', 'relocate', $user['uid']); + Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, $user['uid']); } info("Relocation started. Could take a while to complete."); @@ -165,7 +165,6 @@ class Site extends BaseAdminModule $nodeinfo = !empty($_POST['nodeinfo']); $dfrn_only = !empty($_POST['dfrn_only']); $ostatus_disabled = !empty($_POST['ostatus_disabled']); - $ostatus_full_threads = !empty($_POST['ostatus_full_threads']); $diaspora_enabled = !empty($_POST['diaspora_enabled']); $ssl_policy = (!empty($_POST['ssl_policy']) ? intval($_POST['ssl_policy']) : 0); $force_ssl = !empty($_POST['force_ssl']); @@ -201,7 +200,7 @@ class Site extends BaseAdminModule /** * @var $storagebackend \Friendica\Model\Storage\IStorage */ - $storagebackend = Strings::escapeTags(trim(defaults($_POST, 'storagebackend', ''))); + $storagebackend = Strings::escapeTags(trim($_POST['storagebackend'] ?? '')); // save storage backend form if (!is_null($storagebackend) && $storagebackend != "") { @@ -217,7 +216,7 @@ class Site extends BaseAdminModule $value = !empty($_POST[$fieldname]); break; default: - $value = defaults($_POST, $fieldname, ''); + $value = $_POST[$fieldname] ?? ''; } $storage_opts_data[$name] = $value; } @@ -246,7 +245,7 @@ class Site extends BaseAdminModule $diaspora_enabled = false; } if ($ssl_policy != intval(Config::get('system', 'ssl_policy'))) { - if ($ssl_policy == BaseURL::SSL_POLICY_FULL) { + if ($ssl_policy == App\BaseURL::SSL_POLICY_FULL) { DBA::e("UPDATE `contact` SET `url` = REPLACE(`url` , 'http:' , 'https:'), `photo` = REPLACE(`photo` , 'http:' , 'https:'), @@ -264,7 +263,7 @@ class Site extends BaseAdminModule `thumb` = REPLACE(`thumb` , 'http:' , 'https:') WHERE 1 " ); - } elseif ($ssl_policy == BaseURL::SSL_POLICY_SELFSIGN) { + } elseif ($ssl_policy == App\BaseURL::SSL_POLICY_SELFSIGN) { DBA::e("UPDATE `contact` SET `url` = REPLACE(`url` , 'https:' , 'http:'), `photo` = REPLACE(`photo` , 'https:' , 'http:'), @@ -360,7 +359,6 @@ class Site extends BaseAdminModule Config::set('system', 'curl_timeout' , $timeout); Config::set('system', 'dfrn_only' , $dfrn_only); Config::set('system', 'ostatus_disabled' , $ostatus_disabled); - Config::set('system', 'ostatus_full_threads' , $ostatus_full_threads); Config::set('system', 'diaspora_enabled' , $diaspora_enabled); Config::set('config', 'private_addons' , $private_addons); @@ -513,9 +511,9 @@ class Site extends BaseAdminModule ]; $ssl_choices = [ - BaseURL::SSL_POLICY_NONE => L10n::t('No SSL policy, links will track page SSL state'), - BaseURL::SSL_POLICY_FULL => L10n::t('Force all links to use SSL'), - BaseURL::SSL_POLICY_SELFSIGN => L10n::t('Self-signed certificate, use SSL for local links only (discouraged)') + App\BaseURL::SSL_POLICY_NONE => L10n::t('No SSL policy, links will track page SSL state'), + App\BaseURL::SSL_POLICY_FULL => L10n::t('Force all links to use SSL'), + App\BaseURL::SSL_POLICY_SELFSIGN => L10n::t('Self-signed certificate, use SSL for local links only (discouraged)') ]; $check_git_version_choices = [ @@ -626,7 +624,6 @@ class Site extends BaseAdminModule '$community_page_style' => ['community_page_style', L10n::t('Community pages for visitors'), Config::get('system', 'community_page_style'), 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', L10n::t('Posts per user on community page'), Config::get('system', 'max_author_posts_community_page'), L10n::t('The maximum number of posts per user on the community page. (Not valid for "Global Community")')], '$ostatus_disabled' => ['ostatus_disabled', L10n::t('Disable OStatus support'), Config::get('system', 'ostatus_disabled'), L10n::t('Disable built-in OStatus (StatusNet, GNU Social etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.')], - '$ostatus_full_threads' => ['ostatus_full_threads', L10n::t('Only import OStatus/ActivityPub threads from our contacts'), Config::get('system', 'ostatus_full_threads'), L10n::t('Normally we import every content from our OStatus and ActivityPub contacts. With this option we only store threads that are started by a contact that is known on our system.')], '$ostatus_not_able' => L10n::t('OStatus support can only be enabled if threading is enabled.'), '$diaspora_able' => $diaspora_able, '$diaspora_not_able' => L10n::t('Diaspora support can\'t be enabled because Friendica was installed into a sub directory.'),