From 74f4637ff3fc799875c12564df7b68b74a3188fc Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 30 Dec 2019 01:17:16 +0000 Subject: [PATCH] Fix fatal errors caused by PR 8019 --- src/Module/Magic.php | 2 +- src/Module/OpenSearch.php | 2 +- src/Module/Register.php | 2 +- src/Module/WellKnown/HostMeta.php | 2 +- src/Protocol/Feed.php | 2 +- src/Protocol/OStatus.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Module/Magic.php b/src/Module/Magic.php index 0ac05ccdf8..a95b7e6ba0 100644 --- a/src/Module/Magic.php +++ b/src/Module/Magic.php @@ -80,7 +80,7 @@ class Magic extends BaseModule $headers = HTTPSignature::createSig( $headers, $user['prvkey'], - 'acct:' . $user['nickname'] . '@' . DI::baseUrl()->getHostname()() . (DI::baseUrl()->getUrlPath() ? '/' . DI::baseUrl()->getUrlPath() : '') + 'acct:' . $user['nickname'] . '@' . DI::baseUrl()->getHostname() . (DI::baseUrl()->getUrlPath() ? '/' . DI::baseUrl()->getUrlPath() : '') ); // Try to get an authentication token from the other instance. diff --git a/src/Module/OpenSearch.php b/src/Module/OpenSearch.php index e1da674184..044c2b1278 100644 --- a/src/Module/OpenSearch.php +++ b/src/Module/OpenSearch.php @@ -21,7 +21,7 @@ class OpenSearch extends BaseModule { header('Content-type: application/opensearchdescription+xml'); - $hostname = DI::baseUrl()->getHostname()(); + $hostname = DI::baseUrl()->getHostname(); $baseUrl = DI::baseUrl()->get(); /** @var DOMDocument $xml */ diff --git a/src/Module/Register.php b/src/Module/Register.php index 613b3da7b5..4bf9e5edd2 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -132,7 +132,7 @@ class Register extends BaseModule '$username' => $username, '$email' => $email, '$nickname' => $nickname, - '$sitename' => DI::baseUrl()->getHostname()(), + '$sitename' => DI::baseUrl()->getHostname(), '$importh' => L10n::t('Import'), '$importt' => L10n::t('Import your profile to this friendica instance'), '$showtoslink' => Config::get('system', 'tosdisplay'), diff --git a/src/Module/WellKnown/HostMeta.php b/src/Module/WellKnown/HostMeta.php index 2bae006a70..8781169635 100644 --- a/src/Module/WellKnown/HostMeta.php +++ b/src/Module/WellKnown/HostMeta.php @@ -29,7 +29,7 @@ class HostMeta extends BaseModule $tpl = Renderer::getMarkupTemplate('xrd_host.tpl'); echo Renderer::replaceMacros($tpl, [ - '$zhost' => DI::baseUrl()->getHostname()(), + '$zhost' => DI::baseUrl()->getHostname(), '$zroot' => DI::baseUrl()->get(), '$domain' => DI::baseUrl()->get(), '$bigkey' => Salmon::salmonKey($config->get('system', 'site_pubkey')) diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index c30e08f7be..acdd168ed4 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -466,7 +466,7 @@ class Feed { // Distributed items should have a well formatted URI. // Additionally we have to avoid conflicts with identical URI between imported feeds and these items. if ($notify) { - $item['guid'] = Item::guidFromUri($orig_plink, DI::baseUrl()->getHostname()()); + $item['guid'] = Item::guidFromUri($orig_plink, DI::baseUrl()->getHostname()); unset($item['uri']); unset($item['parent-uri']); diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index f1cfa54c0f..bd045c0200 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -1847,7 +1847,7 @@ class OStatus } $item["uri"] = $item['parent-uri'] = $item['thr-parent'] - = 'tag:' . DI::baseUrl()->getHostname()(). + = 'tag:' . DI::baseUrl()->getHostname(). ','.date('Y-m-d').':'.$action.':'.$owner['uid']. ':person:'.$connect_id.':'.$item['created'];