diff options
author | Michael <icarus@dabo.de> | 2012-04-14 13:03:40 +0200 |
---|---|---|
committer | Michael <icarus@dabo.de> | 2012-04-14 13:03:40 +0200 |
commit | 188829ed46be6d3c7a91380226e26e8292c327be (patch) | |
tree | 2fb4148bc2222cf198309f4025862080c89fe36b /include/Contact.php | |
parent | 7384786d4417ddd051b7daa71c019d3c551efc68 (diff) | |
parent | 0d869ceb65badbd4d80dd0d5cf2d631bca7f5b9e (diff) | |
download | volse-hubzilla-188829ed46be6d3c7a91380226e26e8292c327be.tar.gz volse-hubzilla-188829ed46be6d3c7a91380226e26e8292c327be.tar.bz2 volse-hubzilla-188829ed46be6d3c7a91380226e26e8292c327be.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/Contact.php')
-rw-r--r-- | include/Contact.php | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/include/Contact.php b/include/Contact.php index 8d893cf70..388819b01 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -176,10 +176,24 @@ function random_profile() { } -function contacts_not_grouped($uid) { - $r = q("select * from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) ", +function contacts_not_grouped($uid,$start = 0,$count = 0) { + + if(! $count) { + $r = q("select count(*) as total from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) ", + intval($uid), + intval($uid) + ); + + return $r; + + + } + + $r = q("select * from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) and blocked = 0 and pending = 0 limit %d, %d", + intval($uid), intval($uid), - intval($uid) + intval($start), + intval($count) ); return $r; |