diff options
-rw-r--r-- | include/attach.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/attach.php b/include/attach.php index f61fea9a5..f878a886f 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1258,15 +1258,10 @@ function recursive_activity_recipients($allow_cid, $allow_gid, $deny_cid, $deny_ } function in_group($group_id) { - //TODO: make these two queries one with a join. - $x = q("SELECT id FROM groups WHERE hash = '%s'", + $r = q("SELECT xchan FROM group_member left join groups on group_member.gid = group.id WHERE hash = '%s' ", dbesc($group_id) ); - $r = q("SELECT xchan FROM group_member WHERE gid = %d", - intval($x[0]['id']) - ); - foreach($r as $ig) { $group_members[] = $ig['xchan']; } |