diff options
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r-- | Bugzilla/Attachment.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index f5929c4a7..625d1cccf 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -664,6 +664,11 @@ sub get_attachments_by_bug { push(@values, $user->id); } + # BMO - allow loading of just non-obsolete attachments + if ($vars->{exclude_obsolete}) { + $and_restriction .= ' AND (isobsolete = 0)'; + } + my $attach_ids = $dbh->selectcol_arrayref("SELECT attach_id FROM attachments WHERE bug_id = ? $and_restriction", undef, @values); |