]> git.mxchange.org Git - friendica.git/commitdiff
Changed:
authorRoland Häder <roland@mxchange.org>
Sat, 13 Aug 2022 04:50:50 +0000 (06:50 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 13 Aug 2022 04:52:09 +0000 (06:52 +0200)
- used $this->baseurl instead of DI::baseurl() (@MrPetovan)

src/Module/Xrd.php

index 9420a2c61a8cdf5028cfa7138c80f8fc5b65fb6c..810424504e9e9954f0f18574b1f534ebf23272c3 100644 (file)
@@ -110,6 +110,7 @@ class Xrd extends BaseModule
 
        private static function printSystemJSON(array $owner)
        {
+               $baseURL = $this->baseurl->get();
                $json = [
                        'subject' => 'acct:' . $owner['addr'],
                        'aliases' => [$owner['url']],
@@ -126,26 +127,26 @@ class Xrd extends BaseModule
                                ],
                                [
                                        'rel'      => 'http://ostatus.org/schema/1.0/subscribe',
-                                       'template' => DI::baseUrl()->get() . '/follow?url={uri}',
+                                       'template' => $baseURL . '/follow?url={uri}',
                                ],
                                [
                                        'rel'  => ActivityNamespace::FEED,
                                        'type' => 'application/atom+xml',
-                                       'href' => $owner['poll'] ?? DI::baseUrl()->get(),
+                                       'href' => $owner['poll'] ?? $baseURL,
                                ],
                                [
                                        'rel'  => 'salmon',
-                                       'href' => DI::baseUrl()->get() . '/salmon/' . $owner['nickname'],
+                                       'href' => $baseURL . '/salmon/' . $owner['nickname'],
                                ],
                                [
                                        'rel'  => 'http://microformats.org/profile/hcard',
                                        'type' => 'text/html',
-                                       'href' => DI::baseUrl()->get() . '/hcard/' . $owner['nickname'],
+                                       'href' => $baseURL . '/hcard/' . $owner['nickname'],
                                ],
                                [
                                        'rel'  => 'http://joindiaspora.com/seed_location',
                                        'type' => 'text/html',
-                                       'href' => DI::baseUrl()->get(),
+                                       'href' => $baseURL,
                                ],
                        ]
                ];
@@ -155,7 +156,7 @@ class Xrd extends BaseModule
 
        private static function printJSON(string $alias, array $owner, array $avatar)
        {
-               $baseURL = DI::baseUrl()->get();
+               $baseURL = $this->baseurl->get();
                $salmon_key = Salmon::salmonKey($owner['spubkey']);
 
                $json = [
@@ -237,7 +238,7 @@ class Xrd extends BaseModule
 
        private static function printXML(string $alias, array $user, array $owner, array $avatar)
        {
-               $baseURL = DI::baseUrl()->get();
+               $baseURL = $this->baseurl->get();
                $salmon_key = Salmon::salmonKey($owner['spubkey']);
 
                $tpl = Renderer::getMarkupTemplate('xrd_person.tpl');