From: lpsolit%gmail.com <> Date: Tue, 9 Sep 2008 05:30:07 +0000 (+0000) Subject: Fix bustage due to bug 453743: I have to exclude flags related to private attachments... X-Git-Tag: bugzilla-3.3.1~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de1fd5b0a978941a0e3aad505451d56b905ba487;p=thirdparty%2Fbugzilla.git Fix bustage due to bug 453743: I have to exclude flags related to private attachments you cannot see --- diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index b299d6503a..3582ffb230 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]; }