X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcontacts.php;h=a4caafe8f9cd8b2e4f2e5b7d1f1af11cc7efafed;hb=050ad68b9fc21fc5cf06153d2c6d161d30b241c6;hp=cd9021c17ec2cd4edde1b6c9b1997f92bb840f89;hpb=27d94023eef0263a3ce9750f79a73ac941a25304;p=friendica.git diff --git a/mod/contacts.php b/mod/contacts.php index cd9021c17e..a4caafe8f9 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -65,7 +65,7 @@ function contacts_init(App $a) $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), [ '$name' => htmlentities($a->data['contact']['name']), '$photo' => $a->data['contact']['photo'], - '$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? "redir/" . $a->data['contact']['id'] : $a->data['contact']['url'], + '$url' => Contact::MagicLink($a->data['contact']['url']), '$addr' => (($a->data['contact']['addr'] != "") ? ($a->data['contact']['addr']) : ""), '$network_name' => $networkname, '$network' => L10n::t('Network:'), @@ -87,7 +87,7 @@ function contacts_init(App $a) $findpeople_widget = Widget::findPeople(); } - $groups_widget = Group::sidebarWidget('contacts', 'group', 'full', 0, $contact_id); + $groups_widget = Group::sidebarWidget('contacts', 'group', 'full', 'everyone', $contact_id); $a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"), [ '$vcard_widget' => $vcard_widget, @@ -536,11 +536,10 @@ function contacts_content(App $a) $relation_text = sprintf($relation_text, htmlentities($contact['name'])); - if (($contact['network'] === NETWORK_DFRN) && ($contact['rel'])) { - $url = "redir/{$contact['id']}"; + $url = Contact::magicLink($contact['url']); + if (strpos($url, 'redir/') === 0) { $sparkle = ' class="sparkle" '; } else { - $url = $contact['url']; $sparkle = ''; } @@ -940,11 +939,11 @@ function _contact_detail_for_template($rr) default: break; } - if (($rr['network'] === NETWORK_DFRN) && ($rr['rel'])) { - $url = "redir/{$rr['id']}"; + + $url = Contact::magicLink($rr['url']); + if (strpos($url, 'redir/') === 0) { $sparkle = ' class="sparkle" '; } else { - $url = $rr['url']; $sparkle = ''; } @@ -970,6 +969,7 @@ function _contact_detail_for_template($rr) 'itemurl' => (($rr['addr'] != "") ? $rr['addr'] : $rr['url']), 'url' => $url, 'network' => ContactSelector::networkToName($rr['network'], $rr['url']), + 'nick' => htmlentities($rr['nick']), ]; }