From 5b48ab772b24102a72945fe3a4f141f8380dcf86 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 5 Nov 2013 14:26:31 -0800 Subject: fix private group delivery --- include/group.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/group.php') diff --git a/include/group.php b/include/group.php index 7ba14a49d..eece07983 100644 --- a/include/group.php +++ b/include/group.php @@ -298,12 +298,13 @@ function expand_groups($a) { if(! (is_array($a) && count($a))) return array(); $x = $a; - stringify_array_elms($x); + stringify_array_elms($x,true); $groups = implode(',', $x); - $groups = dbesc($groups); + if($groups) - $r = q("SELECT xchan FROM group_member WHERE gid IN ( $groups )"); + $r = q("SELECT xchan FROM group_member WHERE gid IN ( select id from `group` where hash in ( $groups ))"); $ret = array(); + if($r) foreach($r as $rr) $ret[] = $rr['xchan']; -- cgit v1.2.3