- $c = dba::selectFirst('contact', ['name', 'url', 'photo'], ['self' => true, 'uid' => $uid]);
-
- if (DBM::is_result($c)) {
- $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), array(
- '$name' => htmlentities($c['name']),
- '$photo' => $c['photo'],
- 'url' => 'contacts/' . $cid
- ));
-
- if (!x($a->page, 'aside')) {
+ $contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['self' => true, 'uid' => $uid]);
+
+ if (DBA::isResult($contact)) {
+ $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate("widget/vcard.tpl"), [
+ '$name' => $contact['name'],
+ '$photo' => $contact['photo'],
+ 'url' => 'contact/' . $cid
+ ]);
+
+ if (empty($a->page['aside'])) {