]> 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:34:44 +0000 (18:34 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 17 May 2010 16:34:44 +0000 (18:34 +0200)
a=LpSolit

attachment.cgi

index b79c649f427fd7d1b24d848417872ddae20617db..b6515d037fa9a674202f74891bcea8dcbcb54bf0 100755 (executable)
@@ -377,6 +377,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;