summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorjouni%heikniemi.net <>2004-07-06 16:08:02 +0200
committerjouni%heikniemi.net <>2004-07-06 16:08:02 +0200
commit6c0b6e11bf1e302320bebe0ce9545eff924ab124 (patch)
treeec6538b7ffb236cd3c092d5942c89343daa0f171 /Bugzilla/Bug.pm
parent73fd49ff3bbff6244802ba548bb22c2be39014e1 (diff)
downloadbugzilla-6c0b6e11bf1e302320bebe0ce9545eff924ab124.tar.gz
bugzilla-6c0b6e11bf1e302320bebe0ce9545eff924ab124.tar.xz
Bug 223878: Flag system dies when changing a deleted flag.
r=joel, justdave a=justdave
Diffstat (limited to 'Bugzilla/Bug.pm')
-rwxr-xr-xBugzilla/Bug.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 91cd0d8c8..f1a1cf341 100755
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -226,7 +226,8 @@ sub initBug {
$flag_type->{'flags'} =
Bugzilla::Flag::match({ 'bug_id' => $self->{bug_id},
'type_id' => $flag_type->{'id'},
- 'target_type' => 'bug' });
+ 'target_type' => 'bug',
+ 'is_active' => 1 });
}
$self->{'flag_types'} = $flag_types;
$self->{'any_flags_requesteeble'} = grep($_->{'is_requesteeble'}, @$flag_types);
@@ -238,11 +239,11 @@ sub initBug {
my $num_attachment_flag_types =
Bugzilla::FlagType::count({ 'target_type' => 'attachment',
'product_id' => $self->{'product_id'},
- 'component_id' => $self->{'component_id'},
- 'is_active' => 1 });
+ 'component_id' => $self->{'component_id'} });
my $num_attachment_flags =
Bugzilla::Flag::count({ 'target_type' => 'attachment',
- 'bug_id' => $self->{bug_id} });
+ 'bug_id' => $self->{bug_id},
+ 'is_active' => 1 });
$self->{'show_attachment_flags'}
= $num_attachment_flag_types || $num_attachment_flags;