diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-03-26 02:51:40 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-03-26 02:51:40 -0400 |
commit | 629a66793c245d39ca47523a6fbc790fae0cbe3b (patch) | |
tree | e1714c8fca95087ff97a844688c40ade60c3b8ef /include/socgraph.php | |
parent | 2147ffa48734e50c9df1ea91ce100bf5336eacc2 (diff) | |
parent | 37f02424f801b3132b75b39d4132f35025667a75 (diff) | |
download | volse-hubzilla-629a66793c245d39ca47523a6fbc790fae0cbe3b.tar.gz volse-hubzilla-629a66793c245d39ca47523a6fbc790fae0cbe3b.tar.bz2 volse-hubzilla-629a66793c245d39ca47523a6fbc790fae0cbe3b.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
small fix
don't include friend suggestions for people with the same name as current contacts. This will remove a lot of #whoaretonybaldwin.
position the theme-preview on settings page
more wordsmithing of the Friendica invitation email
screenshot gallery
theme preview for end users
* master:
Diffstat (limited to 'include/socgraph.php')
-rwxr-xr-x | include/socgraph.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/socgraph.php b/include/socgraph.php index b2f545509..3f5194049 100755 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -237,12 +237,14 @@ function suggestion_query($uid, $start = 0, $limit = 80) { $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 = 80) { $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) ); |