From 57584dc4744fea59833ef355f7513690d246c70f Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 4 Oct 2011 18:25:23 -0400 Subject: more porting work --- Bugzilla/Product.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Product.pm') diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index a0079a033..976804cb0 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -779,7 +779,8 @@ sub user_has_access { } sub flag_types { - my $self = shift; + my ($self, $params) = @_; + $params ||= {}; return $self->{'flag_types'} if defined $self->{'flag_types'}; @@ -787,7 +788,7 @@ sub flag_types { my $cache = Bugzilla->request_cache->{flag_types_per_product} ||= {}; $self->{flag_types} = {}; my $prod_id = $self->id; - my $flagtypes = Bugzilla::FlagType::match({ product_id => $prod_id }); + my $flagtypes = Bugzilla::FlagType::match({ product_id => $prod_id, %$params }); foreach my $type ('bug', 'attachment') { my @flags = grep { $_->target_type eq $type } @$flagtypes; -- cgit v1.2.3-24-g4f1b