From c7dfa4dd1132f8dd9541e4dd60845da3c589775e Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 9 Sep 2008 05:39:30 +0000 Subject: [PATCH] Fix bustage due to bug 453743: I have to exclude flags related to private attachments you cannot see --- Bugzilla/Bug.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 5ba9d9a462..ad1ffc4444 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -2238,6 +2238,9 @@ sub attachments { my $flags = Bugzilla::Flag->match({ 'bug_id' => $self->bug_id, 'target_type' => 'attachment' }); + # Exclude flags for private attachments you cannot see. + @$flags = grep {exists $att{$_->attach_id}} @$flags; + push(@{$att{$_->attach_id}->{'flags'}}, $_) foreach @$flags; $self->{'attachments'} = [sort {$a->id <=> $b->id} values %att]; -- 2.47.2