mirror of
https://github.com/friendica/friendica
synced 2025-04-26 07:50:15 +00:00
Last refactoring :-) / refactor due feedback
This commit is contained in:
parent
0345c50e2d
commit
2ae4b9f7e9
7 changed files with 243 additions and 234 deletions
|
@ -18,22 +18,22 @@ class HostMeta extends BaseModule
|
|||
$app = self::getApp();
|
||||
$config = $app->getConfig();
|
||||
|
||||
header("Content-type: text/xml");
|
||||
header('Content-type: text/xml');
|
||||
|
||||
if (!$config->get('system', 'site_pubkey', false)) {
|
||||
$res = Crypto::newKeypair(1024);
|
||||
|
||||
$config->set('system','site_prvkey', $res['prvkey']);
|
||||
$config->set('system','site_pubkey', $res['pubkey']);
|
||||
$config->set('system', 'site_prvkey', $res['prvkey']);
|
||||
$config->set('system', 'site_pubkey', $res['pubkey']);
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('xrd_host.tpl');
|
||||
echo Renderer::replaceMacros($tpl, [
|
||||
'$zhost' => $app->getHostName(),
|
||||
'$zroot' => $app->getBaseURL(),
|
||||
'$domain' => $app->getBaseURL(),
|
||||
'$bigkey' => Salmon::salmonKey($config->get('system', 'site_pubkey'))]
|
||||
);
|
||||
'$zhost' => $app->getHostName(),
|
||||
'$zroot' => $app->getBaseURL(),
|
||||
'$domain' => $app->getBaseURL(),
|
||||
'$bigkey' => Salmon::salmonKey($config->get('system', 'site_pubkey'))
|
||||
]);
|
||||
|
||||
exit();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue