From ab3cad89aefaf54bfd942eea62c071760d23dc19 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 8 Jan 2015 11:01:55 +0100 Subject: [PATCH] Only suggest contacts with networks. --- include/socgraph.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/socgraph.php b/include/socgraph.php index 7e2bb7242b..0a85037901 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -316,7 +316,7 @@ function suggestion_query($uid, $start = 0, $limit = 80) { if(! $uid) return array(); - $network = array("", NETWORK_DFRN); + $network = array(NETWORK_DFRN); if (get_config('system','diaspora_enabled')) $network[] = NETWORK_DIASPORA; @@ -325,7 +325,8 @@ function suggestion_query($uid, $start = 0, $limit = 80) { $network[] = NETWORK_OSTATUS; $sql_network = implode("', '", $network); - $sql_network = substr($sql_network, 2)."', ''"; + //$sql_network = "'".$sql_network."', ''"; + $sql_network = "'".$sql_network."'"; $r = q("SELECT count(glink.gcid) as `total`, gcontact.* from gcontact INNER JOIN glink on glink.gcid = gcontact.id