$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);
}
}