diff options
author | 2005-08-19 03:09:36 +0000 | |
---|---|---|
committer | 2005-08-19 03:09:36 +0000 | |
commit | 9d4872bef3b679b020b6678445ec84504e1f8a1e (patch) | |
tree | ba83ecbc319e12000d9ee00d2da2f04facded3d6 /whine.pl | |
parent | Bug 296054: [PostgreSQL] Cannot add a new query for event/whining (diff) | |
download | bugzilla-9d4872bef3b679b020b6678445ec84504e1f8a1e.tar.gz bugzilla-9d4872bef3b679b020b6678445ec84504e1f8a1e.tar.bz2 bugzilla-9d4872bef3b679b020b6678445ec84504e1f8a1e.zip |
Bug 304583: Remove all remaining need to rederive inherited groups
Patch by Joel Peshkin <bugreport@peshkin.net>
r=mkanat, a=justdave
Diffstat (limited to 'whine.pl')
-rwxr-xr-x | whine.pl | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -240,8 +240,7 @@ sub get_next_event { return undef unless $fetched; my ($eventid, $owner_id, $subject, $body) = @{$fetched}; - my $owner = Bugzilla::User->new($owner_id, - DERIVE_GROUPS_TABLES_ALREADY_LOCKED); + my $owner = Bugzilla::User->new($owner_id); my $whineatothers = $owner->in_group('bz_canusewhineatothers'); @@ -275,10 +274,13 @@ sub get_next_event { my $group_id = Bugzilla::Group::ValidateGroupName( $groupname, $owner); if ($group_id) { + my $glist = join(',', + Bugzilla::User->flatten_group_membership( + $group_id)); $sth = $dbh->prepare("SELECT user_id FROM " . "user_group_map " . - "WHERE group_id=?"); - $sth->execute($group_id); + "WHERE group_id IN ($glist)"); + $sth->execute(); for my $row (@{$sth->fetchall_arrayref}) { if (not defined $user_objects{$row->[0]}) { $user_objects{$row->[0]} = |