]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/ReallySimpleDiscovery.php
Merge branch '2023.03-rc' into stable
[friendica.git] / src / Module / ReallySimpleDiscovery.php
index dacee205b0dd8a8d8e67b5cfa1b9f1193393f6b7..6d608063e73072284e4a5eaf52a4c9e840b2d014 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -22,6 +22,7 @@
 namespace Friendica\Module;
 
 use Friendica\BaseModule;
+use Friendica\Core\System;
 use Friendica\DI;
 use Friendica\Util\XML;
 
@@ -33,10 +34,7 @@ class ReallySimpleDiscovery extends BaseModule
 {
        protected function rawContent(array $request = [])
        {
-               header('Content-Type: text/xml');
-
-               $xml = null;
-               echo XML::fromArray([
+               $content = XML::fromArray([
                        'rsd' => [
                                '@attributes' => [
                                        'version' => '1.0',
@@ -50,7 +48,7 @@ class ReallySimpleDiscovery extends BaseModule
                                                        '@attributes' => [
                                                                'name'      => 'Twitter',
                                                                'preferred' => 'true',
-                                                               'apiLink'   => DI::baseUrl()->get(),
+                                                               'apiLink'   => DI::baseUrl(),
                                                                'blogID'    => '',
                                                        ],
                                                        'settings'    => [
@@ -68,7 +66,7 @@ class ReallySimpleDiscovery extends BaseModule
                                        ],
                                ],
                        ],
-               ], $xml);
-               exit();
+               ]);
+               System::httpExit($content, Response::TYPE_XML);
        }
 }