diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-04-04 09:31:12 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-04-04 09:31:12 +0200 |
commit | 92156cd8403fa1521ecf3c3f9ed3823c03c73dcd (patch) | |
tree | 38e7b6573c7162254e56dddcaa1543361ead1dbc /include/group.php | |
parent | b48e82d12ab3d5ea07f9e8410aacb9c3ae842539 (diff) | |
parent | 9b50b0e16f2046b91cb4c734c56024524d8b178b (diff) | |
download | volse-hubzilla-92156cd8403fa1521ecf3c3f9ed3823c03c73dcd.tar.gz volse-hubzilla-92156cd8403fa1521ecf3c3f9ed3823c03c73dcd.tar.bz2 volse-hubzilla-92156cd8403fa1521ecf3c3f9ed3823c03c73dcd.zip |
Merge remote-tracking branch 'friendika-master/master' into iconpopup
Diffstat (limited to 'include/group.php')
-rw-r--r-- | include/group.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/group.php b/include/group.php index 793e854be..07cd45f19 100644 --- a/include/group.php +++ b/include/group.php @@ -110,7 +110,7 @@ function group_get_members($gid) { LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` WHERE `gid` = %d AND `group_member`.`uid` = %d", intval($gid), - intval($_SESSION['uid']) + intval(local_user()) ); if(count($r)) $ret = $r; @@ -118,6 +118,21 @@ function group_get_members($gid) { return $ret; } +function group_public_members($gid) { + $ret = 0; + if(intval($gid)) { + $r = q("SELECT `contact`.`id` AS `contact-id` FROM `group_member` + LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` + WHERE `gid` = %d AND `group_member`.`uid` = %d AND `contact`.`network` != 'dfrn' ", + intval($gid), + intval(local_user()) + ); + if(count($r)) + $ret = count($r); + } + return $ret; +} + function group_side($every="contacts",$each="group") { |