]> git.mxchange.org Git - friendica.git/blobdiff - mod/viewcontacts.php
Improve Console/Config display for array values
[friendica.git] / mod / viewcontacts.php
index 3b81171d7a2968fa6da1180b2ce6ee76f5795806..af5ecd9d67011b5daaeace861600026cd7cd3975 100644 (file)
@@ -46,6 +46,8 @@ function viewcontacts_content(App $a)
                return;
        }
 
+       $is_owner = $a->profile['profile_uid'] == local_user();
+
        $o = "";
 
        // tabs
@@ -94,23 +96,11 @@ function viewcontacts_content(App $a)
                        continue;
                }
 
-               $url = $rr['url'];
-
-               // route DFRN profiles through the redirect
-
-               $is_owner = ((local_user() && ($a->profile['profile_uid'] == local_user())) ? true : false);
-
-               if ($is_owner && ($rr['network'] === NETWORK_DFRN) && ($rr['rel'])) {
-                       $url = 'redir/' . $rr['id'];
-               } else {
-                       $url = Profile::zrl($url);
-               }
-
                $contact_details = Contact::getDetailsByURL($rr['url'], $a->profile['uid'], $rr);
 
                $contacts[] = [
                        'id' => $rr['id'],
-                       'img_hover' => sprintf(L10n::t('Visit %s\'s profile [%s]'), $contact_details['name'], $rr['url']),
+                       'img_hover' => L10n::t('Visit %s\'s profile [%s]', $contact_details['name'], $rr['url']),
                        'photo_menu' => Contact::photoMenu($rr),
                        'thumb' => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB),
                        'name' => htmlentities(substr($contact_details['name'], 0, 20)),
@@ -119,7 +109,7 @@ function viewcontacts_content(App $a)
                        'tags'          => $contact_details['keywords'],
                        'about'         => $contact_details['about'],
                        'account_type'  => Contact::getAccountType($contact_details),
-                       'url' => $url,
+                       'url' => Contact::magicLink($rr['url']),
                        'sparkle' => '',
                        'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
                        'network' => ContactSelector::networkToName($rr['network'], $rr['url']),