From fa306daf3295b6ce67d3b3657259ee265f10a605 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 23 Feb 2007 02:41:29 +0000 Subject: Bug 349423: Release Notes for Bugzilla 3.0 Patch By Max Kanat-Alexander r=LpSolit, a=mkanat --- Bugzilla/Template.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Template.pm') diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index b4e0dcb90..800536cd5 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -35,6 +35,7 @@ package Bugzilla::Template; use strict; use Bugzilla::Constants; +use Bugzilla::Install::Requirements; use Bugzilla::Util; use Bugzilla::User; use Bugzilla::Error; @@ -57,7 +58,6 @@ use base qw(Template); # (which is how Perl implements constants) and ignoring the rest (which, if # Constants.pm exports only constants, as it should, will be nothing else). sub _load_constants { - use Bugzilla::Constants (); my %constants; foreach my $constant (@Bugzilla::Constants::EXPORT, @Bugzilla::Constants::EXPORT_OK) @@ -820,6 +820,16 @@ sub create { Bugzilla::BugMail::Send($id, $mailrecipients); }, + # These don't work as normal constants. + DB_MODULE => \&Bugzilla::Constants::DB_MODULE, + REQUIRED_MODULES => + \&Bugzilla::Install::Requirements::REQUIRED_MODULES, + OPTIONAL_MODULES => sub { + my @optional = @{OPTIONAL_MODULES()}; + @optional = sort {$a->{feature} cmp $b->{feature}} + @optional; + return \@optional; + }, }, }) || die("Template creation failed: " . $class->error()); -- cgit v1.2.3-24-g4f1b