aboutsummaryrefslogtreecommitdiffstats
path: root/include/group.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-14 23:04:10 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-14 23:04:10 -0700
commitd20e1a6f938d088708166e039ae0088a8ddf11e4 (patch)
tree7fa25d32ca357cd04debe066956f9a44f56e5206 /include/group.php
parent43f8dd680234239f2cf6e0d62a12aa32aacf5b16 (diff)
downloadvolse-hubzilla-d20e1a6f938d088708166e039ae0088a8ddf11e4.tar.gz
volse-hubzilla-d20e1a6f938d088708166e039ae0088a8ddf11e4.tar.bz2
volse-hubzilla-d20e1a6f938d088708166e039ae0088a8ddf11e4.zip
feed related
Diffstat (limited to 'include/group.php')
-rw-r--r--include/group.php15
1 files changed, 14 insertions, 1 deletions
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 .= " </ul>\r\n </div>\r\n</div>";
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;
+}