From d20e1a6f938d088708166e039ae0088a8ddf11e4 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 14 Jul 2010 23:04:10 -0700 Subject: feed related --- include/group.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include/group.php') diff --git a/include/group.php b/include/group.php index 1f48cdd56..f2e3d1820 100644 --- a/include/group.php +++ b/include/group.php @@ -150,4 +150,17 @@ EOT; $o .= " \r\n \r\n"; return $o; -} \ No newline at end of file +} + +function expand_groups($a) { + if(! (is_array($a) && count($a))) + return array(); + $groups = implode(',', $a); + $groups = dbesc($groups); + $r = q("SELECT `contact-id` FROM `group_member` WHERE `gid` IN ( $groups )"); + $ret = array(); + if(count($r)) + foreach($r as $rr) + $ret[] = $rr['contact-id']; + return $ret; +} -- cgit v1.2.3