X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FWellKnown%2FHostMeta.php;h=8592dadbe7d54d18e8f11a756d7a05f9db549423;hb=4bfe0eaa33cbecb1c021713671aa2ad697904a0b;hp=aad56293d9aa926bd393103191161f39b360a02a;hpb=8581fbb40ff8c2aef0122aa9e60ec8c5425442b5;p=friendica.git diff --git a/src/Module/WellKnown/HostMeta.php b/src/Module/WellKnown/HostMeta.php index aad56293d9..8592dadbe7 100644 --- a/src/Module/WellKnown/HostMeta.php +++ b/src/Module/WellKnown/HostMeta.php @@ -1,9 +1,29 @@ . + * + */ namespace Friendica\Module\WellKnown; use Friendica\BaseModule; use Friendica\Core\Renderer; +use Friendica\DI; use Friendica\Protocol\Salmon; use Friendica\Util\Crypto; @@ -13,27 +33,26 @@ use Friendica\Util\Crypto; */ class HostMeta extends BaseModule { - public static function rawContent() + public static function rawContent(array $parameters = []) { - $app = self::getApp(); - $config = $app->getConfig(); + $config = DI::config(); - 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' => DI::baseUrl()->getHostname(), + '$zroot' => DI::baseUrl()->get(), + '$domain' => DI::baseUrl()->get(), + '$bigkey' => Salmon::salmonKey($config->get('system', 'site_pubkey')) + ]); exit(); }