summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Attachment.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-09-09 07:30:07 +0200
committerlpsolit%gmail.com <>2008-09-09 07:30:07 +0200
commitde1fd5b0a978941a0e3aad505451d56b905ba487 (patch)
tree221ee6d65a88a53ef907e19ee28a1c00d53e1992 /Bugzilla/Attachment.pm
parenta84d94e06c63d6816de538b16e9ede71ddedbfd7 (diff)
downloadbugzilla-de1fd5b0a978941a0e3aad505451d56b905ba487.tar.gz
bugzilla-de1fd5b0a978941a0e3aad505451d56b905ba487.tar.xz
Fix bustage due to bug 453743: I have to exclude flags related to private attachments you cannot see
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r--Bugzilla/Attachment.pm3
1 files changed, 3 insertions, 0 deletions
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];
}