diff options
author | Chris Case <kahotep@bunda.dreamhost.com> | 2011-05-21 21:40:16 -0700 |
---|---|---|
committer | Chris Case <kahotep@bunda.dreamhost.com> | 2011-05-21 21:40:16 -0700 |
commit | 4cff911939b263993eb41682ca558c975e2db01f (patch) | |
tree | 78f58e08d04413827744689d0f5df7660bee6caa /include/group.php | |
parent | 2cf696d0b5d647e1741d2f94ee379aa19b25ae1b (diff) | |
parent | f3f063c0dd7fd8b706987b856d79c7b58924acbb (diff) | |
download | volse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.tar.gz volse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.tar.bz2 volse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.zip |
merged multipart email changes
Diffstat (limited to 'include/group.php')
-rw-r--r-- | include/group.php | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/include/group.php b/include/group.php index 793e854be..8866104fc 100644 --- a/include/group.php +++ b/include/group.php @@ -108,9 +108,9 @@ function group_get_members($gid) { if(intval($gid)) { $r = q("SELECT `group_member`.`contact-id`, `contact`.* FROM `group_member` LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` - WHERE `gid` = %d AND `group_member`.`uid` = %d", + WHERE `gid` = %d AND `group_member`.`uid` = %d ORDER BY `contact`.`name` ASC ", intval($gid), - intval($_SESSION['uid']) + intval(local_user()) ); if(count($r)) $ret = $r; @@ -118,9 +118,25 @@ 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' AND `contact`.`network` != 'mail' AND `contact`.`network` != 'face' ", + intval($gid), + intval(local_user()) + ); + if(count($r)) + $ret = count($r); + } + return $ret; +} + -function group_side($every="contacts",$each="group") { +function group_side($every="contacts",$each="group",$edit = false) { $o = ''; @@ -150,7 +166,7 @@ EOT; ); if(count($r)) { foreach($r as $rr) - $o .= " <li class=\"sidebar-group-li\"><a href=\"$each/{$rr['id']}\">{$rr['name']}</a></li>\r\n"; + $o .= ' <li class="sidebar-group-li">' . (($edit) ? "<a href=\"group/{$rr['id']}\" title=\"" . t('Edit') . "\" ><img src=\"images/spencil.gif\" alt=\"" . t('Edit') . "\"></a> " : "") . "<a href=\"$each/{$rr['id']}\">{$rr['name']}</a></li>\r\n"; } $o .= " </ul>\r\n </div>\r\n</div>"; |