diff options
author | Friendika <info@friendika.com> | 2011-04-03 20:41:40 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-04-03 20:41:40 -0700 |
commit | 9b50b0e16f2046b91cb4c734c56024524d8b178b (patch) | |
tree | 524efc50013a7fd50960adc9092090a2270263ea /include/group.php | |
parent | b500da74b675bc3f88e392573d6602f3e7d94e03 (diff) | |
download | volse-hubzilla-9b50b0e16f2046b91cb4c734c56024524d8b178b.tar.gz volse-hubzilla-9b50b0e16f2046b91cb4c734c56024524d8b178b.tar.bz2 volse-hubzilla-9b50b0e16f2046b91cb4c734c56024524d8b178b.zip |
Public exposure warning on affected network group pages. config-able so a plugin can shut it up.
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") { |