]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/OpenSearch.php
Merge remote-tracking branch 'upstream/develop' into user-defined-channels
[friendica.git] / src / Module / OpenSearch.php
index 9f89660eeda1b9df477681787ee09bfa632c596c..1a4303a683c694cb39931657446f038066d5a059 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -39,12 +39,10 @@ class OpenSearch extends BaseModule
         */
        protected function rawContent(array $request = [])
        {
-               $hostname = DI::baseUrl()->getHostname();
-               $baseUrl  = DI::baseUrl()->get();
+               $hostname = DI::baseUrl()->getHost();
+               $baseUrl  = (string)DI::baseUrl();
 
                /** @var DOMDocument $xml */
-               $xml = null;
-
                XML::fromArray([
                        'OpenSearchDescription' => [
                                '@attributes' => [
@@ -87,6 +85,6 @@ class OpenSearch extends BaseModule
                        'template' => "$baseUrl/opensearch",
                ]);
 
-               System::httpExit($xml->saveXML(), Response::TYPE_XML, 'application/opensearchdescription+xml');
+               $this->httpExit($xml->saveXML(), Response::TYPE_XML, 'application/opensearchdescription+xml');
        }
 }