]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix bustage due to bug 453743: I have to exclude flags related to private attachments...
authorlpsolit%gmail.com <>
Tue, 9 Sep 2008 05:39:30 +0000 (05:39 +0000)
committerlpsolit%gmail.com <>
Tue, 9 Sep 2008 05:39:30 +0000 (05:39 +0000)
Bugzilla/Bug.pm

index 5ba9d9a4629f8eabc5857404128dfd3528eb8b33..ad1ffc4444756c8f19d706b93c578a02283163b6 100644 (file)
@@ -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];