diff options
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Attachment.pm | 5 | ||||
-rw-r--r-- | Bugzilla/Template.pm | 3 |
2 files changed, 8 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); diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index efc2b5931..3664fca81 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -1125,6 +1125,9 @@ sub create { my $template = $class->new($config) || die("Template creation failed: " . $class->error()); + # BMO - hook for defining new vmethods, etc + Bugzilla::Hook::process('template_after_create', { template => $template }); + # Pass on our current language to any template hooks or inner templates # called by this Template object. $template->context->{bz_language} = $opts{language} || ''; |