From ff5673e2d81539dc8b99eae21a26adbaf0a9d890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Sat, 13 Aug 2022 06:50:50 +0200 Subject: [PATCH] Changed: - used $this->baseurl instead of DI::baseurl() (@MrPetovan) --- src/Module/Xrd.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Module/Xrd.php b/src/Module/Xrd.php index 9420a2c61..810424504 100644 --- a/src/Module/Xrd.php +++ b/src/Module/Xrd.php @@ -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');