summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-08-06 04:54:00 +0200
committerlpsolit%gmail.com <>2008-08-06 04:54:00 +0200
commitac99ed7df8d80945ab7860dad022fb5d372ff02d (patch)
treeb00a565356fa0ddee84be8e33f2f905a1b6c13e2 /Bugzilla
parent202409b6ef051db2b8243004ec711bbf7a9b8e79 (diff)
downloadbugzilla-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
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Product.pm9
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};
}