use Friendica\Model;
use Friendica\Module;
use Friendica\Util\Proxy as ProxyUtils;
-
-
-require_once 'include/dba.php';
+use Friendica\Util\Strings;
function common_content(App $a)
{
if (DBA::isResult($contact)) {
$vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate("vcard-widget.tpl"), [
- '$name' => htmlentities($contact['name']),
+ '$name' => $contact['name'],
'$photo' => $contact['photo'],
'url' => 'contact/' . $cid
]);
- if (!x($a->page, 'aside')) {
+ if (empty($a->page['aside'])) {
$a->page['aside'] = '';
}
$a->page['aside'] .= $vcard_widget;
}
if (!$cid && Model\Profile::getMyURL()) {
- $contact = DBA::selectFirst('contact', ['id'], ['nurl' => normalise_link(Model\Profile::getMyURL()), 'uid' => $uid]);
+ $contact = DBA::selectFirst('contact', ['id'], ['nurl' => Strings::normaliseLink(Model\Profile::getMyURL()), 'uid' => $uid]);
if (DBA::isResult($contact)) {
$cid = $contact['id'];
} else {
- $gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => normalise_link(Model\Profile::getMyURL())]);
+ $gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => Strings::normaliseLink(Model\Profile::getMyURL())]);
if (DBA::isResult($gcontact)) {
$zcid = $gcontact['id'];
}
'itemurl' => defaults($contact_details, 'addr', $common_friend['url']),
'name' => $contact_details['name'],
'thumb' => ProxyUtils::proxifyUrl($contact_details['thumb'], false, ProxyUtils::SIZE_THUMB),
- 'img_hover' => htmlentities($contact_details['name']),
+ 'img_hover' => $contact_details['name'],
'details' => $contact_details['location'],
'tags' => $contact_details['keywords'],
'about' => $contact_details['about'],