]> 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:30:07 +0000 (05:30 +0000)
committerlpsolit%gmail.com <>
Tue, 9 Sep 2008 05:30:07 +0000 (05:30 +0000)
Bugzilla/Attachment.pm

index b299d6503a2b5faec0cadb245486152d7afccc3f..3582ffb2304ccf0c8dfc87ffdc1221940c79d448 100644 (file)
@@ -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];
     }