issue #55 (number 2)

This commit is contained in:
friendica 2013-05-28 16:32:31 -07:00
parent 08a4ffd663
commit 281d73b03a

View File

@ -296,12 +296,14 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0
function expand_groups($a) { function expand_groups($a) {
if(! (is_array($a) && count($a))) if(! (is_array($a) && count($a)))
return array(); return array();
stringify_array_elms($groups); $x = $a;
$groups = implode(',', $a); stringify_array_elms($x);
$groups = implode(',', $x);
$groups = dbesc($groups); $groups = dbesc($groups);
$r = q("SELECT xchan FROM `group_member` WHERE `gid` IN ( $groups )"); if($groups)
$r = q("SELECT xchan FROM group_member WHERE gid IN ( $groups )");
$ret = array(); $ret = array();
if(count($r)) if($r)
foreach($r as $rr) foreach($r as $rr)
$ret[] = $rr['xchan']; $ret[] = $rr['xchan'];
return $ret; return $ret;