aboutsummaryrefslogtreecommitdiffstats
path: root/include/Contact.php
diff options
context:
space:
mode:
authorMichael Vogel <icarus@dabo.de>2012-04-14 13:15:25 +0200
committerMichael Vogel <icarus@dabo.de>2012-04-14 13:15:25 +0200
commit4e220ec391514fbdeaa7d64abfd1752a9b44bbaa (patch)
tree1cb3cb621221e948be9e0e91916aac0dd6fccb0e /include/Contact.php
parent572678fef95816deaa1ecafe5cbcfb8cc65963c9 (diff)
parent0d869ceb65badbd4d80dd0d5cf2d631bca7f5b9e (diff)
downloadvolse-hubzilla-4e220ec391514fbdeaa7d64abfd1752a9b44bbaa.tar.gz
volse-hubzilla-4e220ec391514fbdeaa7d64abfd1752a9b44bbaa.tar.bz2
volse-hubzilla-4e220ec391514fbdeaa7d64abfd1752a9b44bbaa.zip
Merge commit 'upstream/master'
Diffstat (limited to 'include/Contact.php')
-rw-r--r--include/Contact.php20
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;