aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-09-09 05:30:07 +0000
committerlpsolit%gmail.com <>2008-09-09 05:30:07 +0000
commitde1fd5b0a978941a0e3aad505451d56b905ba487 (patch)
tree221ee6d65a88a53ef907e19ee28a1c00d53e1992
parentBug 433015: The "Remove Event" and "Update/Commit" buttons in editwhines.cgi ... (diff)
downloadbugzilla-de1fd5b0a978941a0e3aad505451d56b905ba487.tar.gz
bugzilla-de1fd5b0a978941a0e3aad505451d56b905ba487.tar.bz2
bugzilla-de1fd5b0a978941a0e3aad505451d56b905ba487.zip
Fix bustage due to bug 453743: I have to exclude flags related to private attachments you cannot see
-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];
}