diff options
author | Friendika <info@friendika.com> | 2011-11-01 19:16:33 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-11-01 19:16:33 -0700 |
commit | 3d9a9614e232a3ff207803be1092b1d42bcadde6 (patch) | |
tree | af9ba51b8cefc4246a2627ec2e94b940c6531aa4 /mod/contacts.php | |
parent | 0975ea86101281befec9258d58e28c88d7b8ae4d (diff) | |
download | volse-hubzilla-3d9a9614e232a3ff207803be1092b1d42bcadde6.tar.gz volse-hubzilla-3d9a9614e232a3ff207803be1092b1d42bcadde6.tar.bz2 volse-hubzilla-3d9a9614e232a3ff207803be1092b1d42bcadde6.zip |
common friends
Diffstat (limited to 'mod/contacts.php')
-rw-r--r-- | mod/contacts.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index 9bbcea07d..ecfbe6c2c 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -1,6 +1,7 @@ <?php require_once('include/Contact.php'); +require_once('include/socgraph.php'); function contacts_init(&$a) { if(! local_user()) @@ -265,6 +266,8 @@ function contacts_content(&$a) { $nettype = '<div id="contact-edit-nettype">' . sprintf( t('Network type: %s'),network_to_name($r[0]['network'])) . '</div>'; + $common = count_common_friends(local_user(),$r[0]['id']); + $common_text = (($common) ? sprintf( tt('%d friends in common','%d friends in common', $common),$common) : ''); $o .= replace_macros($tpl,array( '$header' => t('Contact Editor'), '$submit' => t('Submit'), @@ -275,6 +278,8 @@ function contacts_content(&$a) { '$lbl_rep2' => t('Occasionally your friends may wish to inquire about this person\'s online legitimacy.'), '$lbl_rep3' => t('You may help them choose whether or not to interact with this person by providing a <em>reputation</em> to guide them.'), '$lbl_rep4' => t('Please take a moment to elaborate on this selection if you feel it could be helpful to others.'), + '$common_text' => $common_text, + '$common_link' => $a->get_baseurl() . '/common/' . $r[0]['id'], '$visit' => sprintf( t('Visit %s\'s profile [%s]'),$r[0]['name'],$r[0]['url']), '$blockunblock' => t('Block/Unblock contact'), '$ignorecont' => t('Ignore contact'), |