X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fallfriends.php;h=498b9d7dbf1cf62b0b61eff85aec17e8575ace5b;hb=1519ac3bf43c23e8d708ecb3fd6b9c165df26b89;hp=49879c7a03dbcab8613032318a0f17b2a4ddc178;hpb=e44b831a2196717cae7e31c9fcbe42baf63541f4;p=friendica.git diff --git a/mod/allfriends.php b/mod/allfriends.php index 49879c7a03..498b9d7dbf 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -32,7 +32,12 @@ function allfriends_content(&$a) { $a->page['aside'] = ""; profile_load($a, "", 0, get_contact_details_by_url($c[0]["url"])); - $r = all_friends(local_user(),$cid); + $total = count_all_friends(local_user(), $cid); + + if(count($total)) + $a->set_pager_total($total); + + $r = all_friends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']); if(! count($r)) { $o .= t('No friends to display.'); @@ -44,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 = ''; @@ -56,16 +61,18 @@ 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'], @@ -87,8 +94,8 @@ function allfriends_content(&$a) { //'$title' => sprintf( t('Friends of %s'), htmlentities($c[0]['name'])), '$tab_str' => $tab_str, '$contacts' => $entries, + '$paginate' => paginate($a), )); -// $o .= paginate($a); return $o; }