]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Friendica.php
Merge pull request #13488 from MrPetovan/bug/frio-search-result-padding
[friendica.git] / src / Module / Friendica.php
index c6e2768bd300032519a894cf4e68afa863f5f6f8..e2a9d5ee65d3e777f9ae5d1e15f72cab150f550b 100644 (file)
@@ -26,7 +26,7 @@ use Friendica\BaseModule;
 use Friendica\Core\Addon;
 use Friendica\Core\Config\Capability\IManageConfigValues;
 use Friendica\Core\Hook;
-use Friendica\Core\KeyValueStorage\Capabilities\IManageKeyValuePairs;
+use Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs;
 use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
 use Friendica\Core\Session\Capability\IHandleUserSessions;
@@ -94,8 +94,7 @@ class Friendica extends BaseModule
 
                $blockList = $this->config->get('system', 'blocklist') ?? [];
 
-               $register_policy_int = $this->config->get('config', 'register_policy');
-               if (!empty($blockList) && ($register_policy_int !== Register::CLOSED || $this->session->isAuthenticated())) {
+               if (!empty($blockList) && ($this->config->get('blocklist', 'public') || $this->session->isAuthenticated())) {
                        $blocked = [
                                'title'    => $this->t('On this server the following remote servers are blocked.'),
                                'header'   => [
@@ -143,9 +142,9 @@ class Friendica extends BaseModule
                                $data = ActivityPub\Transmitter::getProfile(0);
                                header('Access-Control-Allow-Origin: *');
                                header('Cache-Control: max-age=23200, stale-while-revalidate=23200');
-                               System::jsonExit($data, 'application/activity+json');
+                               $this->jsonExit($data, 'application/activity+json');
                        } catch (HTTPException\NotFoundException $e) {
-                               System::jsonError(404, ['error' => 'Record not found']);
+                               $this->jsonError(404, ['error' => 'Record not found']);
                        }
                }
 
@@ -201,6 +200,6 @@ class Friendica extends BaseModule
                        'no_scrape_url'    => $this->baseUrl . '/noscrape',
                ];
 
-               System::jsonExit($data);
+               $this->jsonExit($data);
        }
 }