argc > 1) {
$which = $a->argv[1];
} else {
throw new \Friendica\Network\HTTPException\NotFoundException(L10n::t('No profile'));
}
$profile = 0;
if ((local_user()) && ($a->argc > 2) && ($a->argv[2] === 'view')) {
$which = $a->user['nickname'];
$profile = $a->argv[1];
}
Profile::load($a, $which, $profile);
if (!empty($a->profile['page-flags']) && ($a->profile['page-flags'] == User::PAGE_FLAGS_COMMUNITY)) {
$a->page['htmlhead'] .= '';
}
if (!empty($a->profile['openidserver'])) {
$a->page['htmlhead'] .= '' . "\r\n";
}
if (!empty($a->profile['openid'])) {
$delegate = ((strstr($a->profile['openid'], '://')) ? $a->profile['openid'] : 'http://' . $a->profile['openid']);
$a->page['htmlhead'] .= '' . "\r\n";
}
if (!$blocked) {
$keywords = $a->profile['pub_keywords'] ?? '';
$keywords = str_replace([',',' ',',,'], [' ',',',','], $keywords);
if (strlen($keywords)) {
$a->page['htmlhead'] .= '' . "\r\n";
}
}
$a->page['htmlhead'] .= '' . "\r\n";
$a->page['htmlhead'] .= '' . "\r\n";
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->getHostName() . (($a->getURLPath()) ? '/' . $a->getURLPath() : ''));
$a->page['htmlhead'] .= '' . "\r\n";
header('Link: <' . System::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
$dfrn_pages = ['request', 'confirm', 'notify', 'poll'];
foreach ($dfrn_pages as $dfrn) {
$a->page['htmlhead'] .= "\r\n";
}
}