aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-04-13 11:59:25 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2012-04-13 11:59:25 +0200
commitf6e1ddf7fbcc122f5122336650e1cfaa71aed8e3 (patch)
treefeddc7956054f7966e2f4ebd4231df20e9e31fee /include
parent469710893da118d9fd174d69cc47069541bafe7b (diff)
parentdf1904b204a969780609cac64bbb1a03a8dd3fcb (diff)
downloadvolse-hubzilla-f6e1ddf7fbcc122f5122336650e1cfaa71aed8e3.tar.gz
volse-hubzilla-f6e1ddf7fbcc122f5122336650e1cfaa71aed8e3.tar.bz2
volse-hubzilla-f6e1ddf7fbcc122f5122336650e1cfaa71aed8e3.zip
Merge remote-tracking branch 'friendica/master'
Diffstat (limited to 'include')
-rw-r--r--include/Contact.php27
-rw-r--r--include/group.php1
2 files changed, 27 insertions, 1 deletions
diff --git a/include/Contact.php b/include/Contact.php
index ee434cb6d..388819b01 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -173,4 +173,29 @@ function random_profile() {
if(count($r))
return dirname($r[0]['url']);
return '';
-} \ No newline at end of file
+}
+
+
+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($start),
+ intval($count)
+ );
+
+ return $r;
+}
+
diff --git a/include/group.php b/include/group.php
index 4a35912e5..edb547de6 100644
--- a/include/group.php
+++ b/include/group.php
@@ -212,6 +212,7 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0
'$title' => t('Groups'),
'$edittext' => t('Edit group'),
'$createtext' => t('Create a new group'),
+ '$ungrouped' => (($every === 'contacts') ? t('Contacts not in any group') : ''),
'$groups' => $groups,
'$add' => t('add'),
));