X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcommon.php;h=063eafe67b90d3a1925f6571abb7325e9351c8e8;hb=4a7c3b9eefd381bb5c77a96a4311ceb558a1c1a5;hp=7c12dd39bbf0b0c472adc5249a1d7f72a2700b09;hpb=06a4b0dc5e12bf8ecec18958d5a08c7c405d5aa5;p=friendica.git diff --git a/mod/common.php b/mod/common.php index 7c12dd39bb..063eafe67b 100644 --- a/mod/common.php +++ b/mod/common.php @@ -40,7 +40,7 @@ function common_content(&$a) { $vcard_widget .= replace_macros(get_markup_template("vcard-widget.tpl"),array( '$name' => htmlentities($c[0]['name']), '$photo' => $c[0]['photo'], - 'url' => z_root() . '/contacts/' . $cid + 'url' => 'contacts/' . $cid )); if(! x($a->page,'aside')) @@ -76,23 +76,22 @@ function common_content(&$a) { if($cid) - $t = count_common_friends($uid,$cid); + $t = count_common_friends($uid, $cid); else - $t = count_common_friends_zcid($uid,$zcid); + $t = count_common_friends_zcid($uid, $zcid); - - $a->set_pager_total($t); - - if(! $t) { + if(count($t)) + $a->set_pager_total($t); + else { notice( t('No contacts in common.') . EOL); return $o; } if($cid) - $r = common_friends($uid,$cid); + $r = common_friends($uid, $cid, $a->pager['start'], $a->pager['itemspage']); else - $r = common_friends_zcid($uid,$zcid); + $r = common_friends_zcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']); if(! count($r)) { @@ -110,18 +109,18 @@ function common_content(&$a) { $rr[id] = $rr[cid]; $photo_menu = ''; - $photo_menu = contact_photo_menu ($rr); + $photo_menu = contact_photo_menu($rr); $entry = array( 'url' => $rr['url'], 'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']), - 'name' => $rr['name'], - 'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB), - 'img_hover' => htmlentities($rr['name']), + 'name' => $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, 'id' => ++$id, @@ -140,8 +139,8 @@ function common_content(&$a) { '$title' => $title, '$tab_str' => $tab_str, '$contacts' => $entries, + '$paginate' => paginate($a), )); -// $o .= paginate($a); return $o; }