From: lpsolit%gmail.com <> Date: Tue, 9 Sep 2008 05:39:30 +0000 (+0000) Subject: Fix bustage due to bug 453743: I have to exclude flags related to private attachments... X-Git-Tag: bugzilla-3.2rc2~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7dfa4dd1132f8dd9541e4dd60845da3c589775e;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/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];