diff options
Diffstat (limited to 'include/group.php')
-rw-r--r-- | include/group.php | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/include/group.php b/include/group.php index 0875b10f9..748ec0c13 100644 --- a/include/group.php +++ b/include/group.php @@ -200,7 +200,7 @@ function group_get_members($gid) { if(intval($gid)) { $r = q("SELECT * FROM `group_member` LEFT JOIN abook ON abook_xchan = `group_member`.`xchan` left join xchan on xchan_hash = abook_xchan - WHERE `gid` = %d AND abook_channel = %d and `group_member`.`uid` = %d and xchan_deleted = 0 and abook_blocked = 0 and abook_pending = 0 ORDER BY xchan_name ASC ", + WHERE `gid` = %d AND abook_channel = %d and `group_member`.`uid` = %d and xchan_deleted = 0 and abook_self = 0 and abook_blocked = 0 and abook_pending = 0 ORDER BY xchan_name ASC ", intval($gid), intval(local_channel()), intval(local_channel()) @@ -211,6 +211,22 @@ function group_get_members($gid) { return $ret; } +function group_get_members_xchan($gid) { + $ret = array(); + if(intval($gid)) { + $r = q("SELECT xchan FROM group_member WHERE gid = %d AND uid = %d", + intval($gid), + intval(local_channel()) + ); + if(count($r)) { + foreach($r as $rr) { + $ret[] = $rr['xchan']; + } + } + } + return $ret; +} + function mini_group_select($uid,$group = '') { $grps = array(); @@ -229,7 +245,7 @@ function mini_group_select($uid,$group = '') { logger('mini_group_select: ' . print_r($grps,true), LOGGER_DATA); $o = replace_macros(get_markup_template('group_selection.tpl'), array( - '$label' => t('Add new connections to this collection (privacy group)'), + '$label' => t('Add new connections to this privacy group'), '$groups' => $grps )); return $o; @@ -292,10 +308,10 @@ function group_side($every="connections",$each="group",$edit = false, $group_id $tpl = get_markup_template("group_side.tpl"); $o = replace_macros($tpl, array( - '$title' => t('Collections'), - '$edittext' => t('Edit collection'), - '$createtext' => t('Add new collection'), - '$ungrouped' => (($every === 'contacts') ? t('Channels not in any collection') : ''), + '$title' => t('Privacy Groups'), + '$edittext' => t('Edit group'), + '$createtext' => t('Add privacy group'), + '$ungrouped' => (($every === 'contacts') ? t('Channels not in any privacy group') : ''), '$groups' => $groups, '$add' => t('add'), )); |