aboutsummaryrefslogtreecommitdiffstats
path: root/include/contact_widgets.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-24 16:59:56 -0700
committerzotlabs <mike@macgirvin.com>2017-09-24 16:59:56 -0700
commit8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c (patch)
tree04add36aa35ce8cda58c5594a783737b25346175 /include/contact_widgets.php
parent4d3b0577c9538644ca0eeb2751b285521d2cc86d (diff)
parent866dc9a9b3ca1cd98fc032afe0aec14ccdb86ba0 (diff)
downloadvolse-hubzilla-8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c.tar.gz
volse-hubzilla-8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c.tar.bz2
volse-hubzilla-8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c.zip
Merge branch 'master' into tagging
Diffstat (limited to 'include/contact_widgets.php')
-rw-r--r--include/contact_widgets.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index aac756a46..e5bb696f8 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -143,7 +143,7 @@ function cardcategories_widget($baseurl,$selected = '') {
-function common_friends_visitor_widget($profile_uid) {
+function common_friends_visitor_widget($profile_uid,$cnt = 10) {
if(local_channel() == $profile_uid)
return;
@@ -156,19 +156,20 @@ function common_friends_visitor_widget($profile_uid) {
require_once('include/socgraph.php');
$t = count_common_friends($profile_uid,$observer_hash);
+
if(! $t)
return;
- $r = common_friends($profile_uid,$observer_hash,0,5,true);
+ $r = common_friends($profile_uid,$observer_hash,0,$cnt,true);
return replace_macros(get_markup_template('remote_friends_common.tpl'), array(
- '$desc' => sprintf( tt("%d connection in common", "%d connections in common", $t), $t),
- '$base' => z_root(),
- '$uid' => $profile_uid,
- '$cid' => $observer,
- '$linkmore' => (($t > 5) ? 'true' : ''),
- '$more' => t('show more'),
- '$items' => $r
+ '$desc' => sprintf( t('Common connections: %d'), $t),
+ '$base' => z_root(),
+ '$uid' => $profile_uid,
+ '$cid' => $observer,
+ '$linkmore' => (($t > $cnt) ? 'true' : ''),
+ '$more' => t('show more'),
+ '$items' => $r
));
};