diff options
author | Thomas Willingham <founder@kakste.com> | 2012-03-26 20:17:01 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2012-03-26 20:17:01 +0100 |
commit | 286c230fa858b7b1fead9c3ff722f6b1b9478d01 (patch) | |
tree | 463f0d075f9593a4d513aa91e08ebc896b00779a /include/socgraph.php | |
parent | 64a2b00cdc97e40ac8e9dc8f0b9cdc5d78cdf2c2 (diff) | |
parent | 0a3f2bdd5bc51d7fc642f431843a5b13287ae94e (diff) | |
download | volse-hubzilla-286c230fa858b7b1fead9c3ff722f6b1b9478d01.tar.gz volse-hubzilla-286c230fa858b7b1fead9c3ff722f6b1b9478d01.tar.bz2 volse-hubzilla-286c230fa858b7b1fead9c3ff722f6b1b9478d01.zip |
Merge remote-tracking branch 'main/master'
Diffstat (limited to 'include/socgraph.php')
-rwxr-xr-x | include/socgraph.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/socgraph.php b/include/socgraph.php index 79d7340a4..3f5194049 100755 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -230,19 +230,21 @@ function all_friends($uid,$cid,$start = 0, $limit = 80) { -function suggestion_query($uid, $start = 0, $limit = 40) { +function suggestion_query($uid, $start = 0, $limit = 80) { 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) + where uid = %d and not gcontact.nurl in ( select nurl from contact where uid = %d ) + and not gcontact.name in ( select name from contact where uid = %d ) and not gcontact.id in ( select gcid from gcign where uid = %d ) group by glink.gcid order by total desc limit %d, %d ", intval($uid), intval($uid), intval($uid), + intval($uid), intval($start), intval($limit) ); @@ -252,11 +254,13 @@ function suggestion_query($uid, $start = 0, $limit = 40) { $r2 = q("SELECT gcontact.* from gcontact left join glink on glink.gcid = gcontact.id - where glink.uid = 0 and glink.cid = 0 and not gcontact.nurl in ( select nurl from contact where uid = %d) + where glink.uid = 0 and glink.cid = 0 and not gcontact.nurl in ( select nurl from contact where uid = %d ) + and not gcontact.name in ( select name from contact where uid = %d ) and not gcontact.id in ( select gcid from gcign where uid = %d ) order by rand() limit %d, %d ", intval($uid), intval($uid), + intval($uid), intval($start), intval($limit) ); |