X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FOpenSearch.php;h=1a4303a683c694cb39931657446f038066d5a059;hb=8b02c285472ea28002cf9c8924e2885dd207ccd8;hp=35d6890ec604694d51ebc778830861c89ea2885c;hpb=4a22034be6550bfcd469ccd2de7e866dd4d0a8a7;p=friendica.git diff --git a/src/Module/OpenSearch.php b/src/Module/OpenSearch.php index 35d6890ec6..1a4303a683 100644 --- a/src/Module/OpenSearch.php +++ b/src/Module/OpenSearch.php @@ -1,6 +1,6 @@ getHostname(); - $baseUrl = DI::baseUrl()->get(); + $hostname = DI::baseUrl()->getHost(); + $baseUrl = (string)DI::baseUrl(); /** @var DOMDocument $xml */ - $xml = null; - XML::fromArray([ 'OpenSearchDescription' => [ '@attributes' => [ 'xmlns' => 'http://a9.com/-/spec/opensearch/1.1', ], - 'ShortName' => "Friendica $hostname", - 'Description' => "Search in Friendica $hostname", - 'Contact' => 'https://github.com/friendica/friendica/issues', + 'ShortName' => "Friendica $hostname", + 'Description' => "Search in Friendica $hostname", + 'Contact' => 'https://github.com/friendica/friendica/issues', + 'InputEncoding' => 'UTF-8', + 'OutputEncoding' => 'UTF-8', + 'Developer' => 'Friendica Developer Team', ], ], $xml); @@ -84,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'); } }