From de1fd5b0a978941a0e3aad505451d56b905ba487 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 9 Sep 2008 05:30:07 +0000 Subject: Fix bustage due to bug 453743: I have to exclude flags related to private attachments you cannot see --- Bugzilla/Attachment.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Bugzilla') diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index b299d6503..3582ffb23 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -577,6 +577,9 @@ sub get_attachments_by_bug { my $flags = Bugzilla::Flag->match({ bug_id => $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; $attachments = [sort {$a->id <=> $b->id} values %att]; } -- cgit v1.2.3-24-g4f1b