]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 560281: Do not display deleted attachments in "View All"
authorFrédéric Buclin <LpSolit@gmail.com>
Mon, 17 May 2010 16:37:46 +0000 (18:37 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 17 May 2010 16:37:46 +0000 (18:37 +0200)
a=LpSolit

attachment.cgi

index 0b389501ba9120ac8ea8758d74c1301db17ab93b..80a9b3c65df554eb7607468796e410e1143d4028 100755 (executable)
@@ -379,6 +379,8 @@ sub viewall {
     my $bugid = $bug->id;
 
     my $attachments = Bugzilla::Attachment->get_attachments_by_bug($bugid);
+    # Ignore deleted attachments.
+    @$attachments = grep { $_->datasize } @$attachments;
 
     # Define the variables and functions that will be passed to the UI template.
     $vars->{'bug'} = $bug;