From 5ecf8a501a52ce675d9990ede5d165f789a7e1fc Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 25 Jul 2006 07:23:33 +0000 Subject: Bug 343810: Remove Bugzilla::FlagType::get() and implement real flagtype objects - Patch by Frédéric Buclin a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- request.cgi | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'request.cgi') diff --git a/request.cgi b/request.cgi index aee9c0387..b41361963 100755 --- a/request.cgi +++ b/request.cgi @@ -198,14 +198,10 @@ sub queue { if (defined $form_type && !grep($form_type eq $_, ("", "all"))) { # Check if any matching types are for attachments. If not, don't show # the attachment column in the report. - my $types = Bugzilla::FlagType::match({ 'name' => $form_type }); - my $has_attachment_type = 0; - foreach my $type (@$types) { - if ($type->{'target_type'} eq "attachment") { - $has_attachment_type = 1; - last; - } - } + my $has_attachment_type = + Bugzilla::FlagType::count({ 'name' => $form_type, + 'target_type' => 'attachment' }); + if (!$has_attachment_type) { push(@excluded_columns, 'attachment') } my $quoted_form_type = $dbh->quote($form_type); -- cgit v1.2.3-24-g4f1b