diff --git a/include/contact_widgets.php b/include/contact_widgets.php index efb833aafc..3a21ff2c6f 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -32,9 +32,11 @@ function findpeople_widget() { '$label' => t('Connect/Follow'), '$hint' => t('Examples: Robert Morgenstein, Fishing'), '$findthem' => t('Find'), + '$suggest' => t('Friend Suggestions'), '$similar' => t('Similar Interests'), '$inv' => $inv )); } + diff --git a/include/socgraph.php b/include/socgraph.php index 04e9a9a64b..b9f53d6a6d 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -165,6 +165,9 @@ function common_friends($uid,$cid) { function suggestion_query($uid, $start = 0, $limit = 40) { + if(! $uid) + return array(); + $r = q("SELECT count(glink.gcid) as `total`, gcontact.* from gcontact left join glink on glink.gcid = gcontact.id where uid = %d and not gcontact.nurl in ( select nurl from contact where uid = %d) diff --git a/mod/suggest.php b/mod/suggest.php index f8b8981263..2d2a329388 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -1,6 +1,7 @@ page['aside'] .= follow_widget(); + $a->page['aside'] .= findpeople_widget(); + + $o .= '

' . t('Friend Suggestions') . '

'; diff --git a/view/peoplefind.tpl b/view/peoplefind.tpl index 4b3f01b882..eeae2a29af 100644 --- a/view/peoplefind.tpl +++ b/view/peoplefind.tpl @@ -5,6 +5,7 @@ + {{ if $inv }} {{ endif }}