Commit 5eee7ab7 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 311419: Update the group_controls method from Product.pm to use Group.pm -…

Bug 311419: Update the group_controls method from Product.pm to use Group.pm - Patch by André Batosti <batosti@async.com.br> r=LpSolit a=justdave
parent 2ecd676f
...@@ -129,12 +129,6 @@ sub group_controls { ...@@ -129,12 +129,6 @@ sub group_controls {
if (!defined $self->{group_controls}) { if (!defined $self->{group_controls}) {
my $query = qq{SELECT my $query = qq{SELECT
groups.id, groups.id,
groups.name,
groups.description,
groups.isbuggroup,
groups.last_changed,
groups.userregexp,
groups.isactive,
group_control_map.entry, group_control_map.entry,
group_control_map.membercontrol, group_control_map.membercontrol,
group_control_map.othercontrol, group_control_map.othercontrol,
...@@ -145,8 +139,12 @@ sub group_controls { ...@@ -145,8 +139,12 @@ sub group_controls {
WHERE group_control_map.product_id = ? WHERE group_control_map.product_id = ?
AND groups.isbuggroup != 0 AND groups.isbuggroup != 0
ORDER BY groups.name}; ORDER BY groups.name};
my $self->{group_controls} = $self->{group_controls} =
$dbh->selectall_hashref($query, 'id', undef, $self->id); $dbh->selectall_hashref($query, 'id', undef, $self->id);
foreach my $group (keys(%{$self->{group_controls}})) {
$self->{group_controls}->{$group}->{'group'} =
new Bugzilla::Group($group);
}
} }
return $self->{group_controls}; return $self->{group_controls};
} }
...@@ -354,8 +352,9 @@ Product.pm represents a product object. ...@@ -354,8 +352,9 @@ Product.pm represents a product object.
Params: none. Params: none.
Returns: A hash with group id as key and hash containing the Returns: A hash with group id as key and hash containing
group data as value. a Bugzilla::Group object and the properties of group
relative to the product.
=item C<versions()> =item C<versions()>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment