diff options
author | lpsolit%gmail.com <> | 2008-08-06 04:54:00 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-08-06 04:54:00 +0200 |
commit | ac99ed7df8d80945ab7860dad022fb5d372ff02d (patch) | |
tree | b00a565356fa0ddee84be8e33f2f905a1b6c13e2 | |
parent | 202409b6ef051db2b8243004ec711bbf7a9b8e79 (diff) | |
download | bugzilla-ac99ed7df8d80945ab7860dad022fb5d372ff02d.tar.gz bugzilla-ac99ed7df8d80945ab7860dad022fb5d372ff02d.tar.xz |
Bug 449248: Improve $product->group_controls - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
-rw-r--r-- | Bugzilla/Product.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index f5c4fae6c..e0a265b69 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -509,10 +509,11 @@ sub group_controls { ORDER BY groups.name}; $self->{group_controls} = $dbh->selectall_hashref($query, 'id', undef, $self->id); - foreach my $group (keys(%{$self->{group_controls}})) { - $self->{group_controls}->{$group}->{'group'} = - new Bugzilla::Group($group); - } + + # For each group ID listed above, create and store its group object. + my @gids = keys %{$self->{group_controls}}; + my $groups = Bugzilla::Group->new_from_list(\@gids); + $self->{group_controls}->{$_->id}->{group} = $_ foreach @$groups; } return $self->{group_controls}; } |