aboutsummaryrefslogtreecommitdiffstats
path: root/mod/directory.php
diff options
context:
space:
mode:
authorfriendica <redmatrix@redmatrix.me>2015-04-06 19:00:13 -0700
committerfriendica <redmatrix@redmatrix.me>2015-04-06 19:00:13 -0700
commit3a3563a4b1673cdd86fdba01985ccfea98ab8b0e (patch)
tree159aba494d46e7c334b2b0fb5a3b2ad8a3b4db09 /mod/directory.php
parent04c993ff2a17274edd8e0f4422f71edad52d8f56 (diff)
downloadvolse-hubzilla-3a3563a4b1673cdd86fdba01985ccfea98ab8b0e.tar.gz
volse-hubzilla-3a3563a4b1673cdd86fdba01985ccfea98ab8b0e.tar.bz2
volse-hubzilla-3a3563a4b1673cdd86fdba01985ccfea98ab8b0e.zip
commit 59828593c broke some important poco stuff, looks like the cat might have climbed over the keyboard and deleted something that wasn't intended to be deleted.
Diffstat (limited to 'mod/directory.php')
-rw-r--r--mod/directory.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/mod/directory.php b/mod/directory.php
index 87dadc58f..2a4672039 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -82,12 +82,15 @@ function directory_content(&$a) {
$suggest = (local_channel() && x($_REQUEST,'suggest')) ? $_REQUEST['suggest'] : '';
if($suggest) {
+
$r = suggestion_query(local_channel(),get_observer_hash());
// Remember in which order the suggestions were
$addresses = array();
+ $common = array();
$index = 0;
foreach($r as $rr) {
+// $common[$rr['xchan_addr']] = $rr['total'];
$addresses[$rr['xchan_addr']] = $index++;
}
@@ -300,6 +303,8 @@ function directory_content(&$a) {
'keywords' => $out,
'ignlink' => $suggest ? $a->get_baseurl() . '/directory?ignore=' . $rr['hash'] : '',
'ignore_label' => "Don't suggest",
+ 'common_friends' => (($common[$rr['address']]) ? intval($common[$rr['address']]) : ''),
+ 'common_txt' => sprintf( t('Common connections: %s'), intval($common[$rr['address']]) ),
'safe' => $safe_mode
);