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;
$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' => [
$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']);
}
}
'no_scrape_url' => $this->baseUrl . '/noscrape',
];
- System::jsonExit($data);
+ $this->jsonExit($data);
}
}