]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/WellKnown/HostMeta.php
Merge pull request #7828 from nupplaphil/task/move_enotify
[friendica.git] / src / Module / WellKnown / HostMeta.php
index 282781adf2c9c74390fbb0fc915317393fe23418..cb344b695e35dad1c13473ac520341c11482214d 100644 (file)
@@ -13,29 +13,27 @@ use Friendica\Util\Crypto;
  */
 class HostMeta extends BaseModule
 {
-       public static function rawContent()
+       public static function rawContent(array $parameters = [])
        {
-               parent::rawContent();
-
                $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();
        }