]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 553266: config.cgi?ctype=rdf spends most of its time loading flagtypes from the...
authorFrédéric Buclin <LpSolit@gmail.com>
Wed, 20 Oct 2010 00:33:33 +0000 (02:33 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 20 Oct 2010 00:33:33 +0000 (02:33 +0200)
a=LpSolit (module owner)

Bugzilla/Component.pm

index 194a3957c78fdf4cbaa84777024250f592e0ce48..dda599b52f2a92bae95c93c70fad89e27b2788eb 100644 (file)
@@ -374,16 +374,14 @@ sub flag_types {
     my $self = shift;
 
     if (!defined $self->{'flag_types'}) {
+        my $flagtypes = Bugzilla::FlagType::match({ product_id   => $self->product_id,
+                                                    component_id => $self->id });
+
         $self->{'flag_types'} = {};
         $self->{'flag_types'}->{'bug'} =
-          Bugzilla::FlagType::match({ 'target_type'  => 'bug',
-                                      'product_id'   => $self->product_id,
-                                      'component_id' => $self->id });
-
+          [grep { $_->target_type eq 'bug' } @$flagtypes];
         $self->{'flag_types'}->{'attachment'} =
-          Bugzilla::FlagType::match({ 'target_type'  => 'attachment',
-                                      'product_id'   => $self->product_id,
-                                      'component_id' => $self->id });
+          [grep { $_->target_type eq 'attachment' } @$flagtypes];
     }
     return $self->{'flag_types'};
 }