X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FHCard.php;h=92627125abba940e358e29082426cbce555549eb;hb=c1686c486c8fcb4f94f89df869ae72509f3583fe;hp=079f240ae4b72b1fafc82cc1ec416570e8f170bc;hpb=ceeb2461280da39f9b008d31e587802a7faaecc7;p=friendica.git diff --git a/src/Module/HCard.php b/src/Module/HCard.php index 079f240ae4..92627125ab 100644 --- a/src/Module/HCard.php +++ b/src/Module/HCard.php @@ -1,6 +1,6 @@ getLocalUserId() && ($this->parameters['action'] ?? '') === 'view') { // A logged in user views a profile of a user $nickname = DI::app()->getLoggedInUserNickname(); - } elseif (empty($parameters['action'])) { + } elseif (empty($this->parameters['action'])) { // Show the profile hCard - $nickname = $parameters['profile']; + $nickname = $this->parameters['profile']; } else { throw new HTTPException\NotFoundException(DI::l10n()->t('No profile')); } @@ -67,18 +66,18 @@ class HCard extends BaseModule $baseUrl = DI::baseUrl(); - $uri = urlencode('acct:' . $profile['nickname'] . '@' . $baseUrl->getHostname() . ($baseUrl->getUrlPath() ? '/' . $baseUrl->getUrlPath() : '')); + $uri = urlencode('acct:' . $profile['nickname'] . '@' . $baseUrl->getHost() . ($baseUrl->getPath() ? '/' . $baseUrl->getPath() : '')); $page['htmlhead'] .= '' . "\r\n"; - $page['htmlhead'] .= '' . "\r\n"; - $page['htmlhead'] .= '' . "\r\n"; - header('Link: <' . $baseUrl->get() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false); + $page['htmlhead'] .= '' . "\r\n"; + $page['htmlhead'] .= '' . "\r\n"; + header('Link: <' . $baseUrl . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false); foreach (['request', 'confirm', 'notify', 'poll'] as $dfrn) { - $page['htmlhead'] .= "get() . "/dfrn_{$dfrn}/{$nickname}\" />\r\n"; + $page['htmlhead'] .= "\r\n"; } - $block = (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()); + $block = (DI::config()->get('system', 'block_public') && !DI::userSession()->isAuthenticated()); // check if blocked if ($block) {