aboutsummaryrefslogtreecommitdiffstats
path: root/include/socgraph.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-01 21:22:27 -0700
committerfriendica <info@friendica.com>2012-05-01 21:22:27 -0700
commitbecdb1f5085f2561b8b0acebbdbf43e4a81d50da (patch)
tree9b9f482f611b6dd91866518387b79140c6567be7 /include/socgraph.php
parent1fab28c413d79a132b1592ff51db3729141d6998 (diff)
downloadvolse-hubzilla-becdb1f5085f2561b8b0acebbdbf43e4a81d50da.tar.gz
volse-hubzilla-becdb1f5085f2561b8b0acebbdbf43e4a81d50da.tar.bz2
volse-hubzilla-becdb1f5085f2561b8b0acebbdbf43e4a81d50da.zip
final touches - show friends in common with total strangers from different sites
Diffstat (limited to 'include/socgraph.php')
-rw-r--r--include/socgraph.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/socgraph.php b/include/socgraph.php
index cf0042256..a08d58074 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -182,17 +182,18 @@ function count_common_friends($uid,$cid) {
}
-function common_friends($uid,$cid) {
+function common_friends($uid,$cid,$limit=9999) {
$r = q("SELECT `gcontact`.*
FROM `glink` left join `gcontact` on `glink`.`gcid` = `gcontact`.`id`
where `glink`.`cid` = %d and `glink`.`uid` = %d
and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and id != %d )
- order by `gcontact`.`name` asc ",
+ order by `gcontact`.`name` asc limit 0, %d",
intval($cid),
intval($uid),
intval($uid),
- intval($cid)
+ intval($cid),
+ intval($limit)
);
return $r;