X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fallfriends.php;h=240aa524be308ea605076fcb250a9da693a7dd42;hb=378cbd90270516be1701adc5bfe64008ef0c17d9;hp=356a389b83693ce291ae4b4afce726dcad7e0105;hpb=c5f2157eb2914de06ae098907b1dfb68fc4d03e3;p=friendica.git diff --git a/mod/allfriends.php b/mod/allfriends.php index 356a389b83..240aa524be 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -39,7 +39,7 @@ function allfriends_content(&$a) { $r = all_friends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']); - if(! count($r)) { + if(! dbm::is_result($r)) { $o .= t('No friends to display.'); return $o; } @@ -49,7 +49,7 @@ function allfriends_content(&$a) { foreach($r as $rr) { //get further details of the contact - $contact_details = get_contact_details_by_url($rr['url'], $uid); + $contact_details = get_contact_details_by_url($rr['url'], $uid, $rr); $photo_menu = ''; @@ -61,20 +61,22 @@ function allfriends_content(&$a) { } else { $connlnk = $a->get_baseurl() . '/follow/?url=' . $rr['url']; - $photo_menu = array(array(t("View Profile"), zrl($rr['url']))); - $photo_menu[] = array(t("Connect/Follow"), $connlnk); + $photo_menu = array( + 'profile' => array(t("View Profile"), zrl($rr['url'])), + 'follow' => array(t("Connect/Follow"), $connlnk) + ); } $entry = array( 'url' => $rr['url'], 'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']), - 'name' => htmlentities($rr['name']), - 'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB), - 'img_hover' => htmlentities($rr['name']), + 'name' => htmlentities($contact_details['name']), + 'thumb' => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB), + 'img_hover' => htmlentities($contact_details['name']), 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], - 'account_type' => (($contact_details['community']) ? t('Forum') : ''), + 'account_type' => account_type($contact_details), 'network' => network_to_name($contact_details['network'], $contact_details['url']), 'photo_menu' => $photo_menu, 'conntxt' => t('Connect'),