diff options
author | mkanat%bugzilla.org <> | 2009-08-11 06:34:17 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-08-11 06:34:17 +0200 |
commit | ea25630305fbd3b55c142c32aab82f9cc7afccfa (patch) | |
tree | 1b554df79fe0a83a02075566615552783e9e873b /Bugzilla/Template.pm | |
parent | 918a8c245f8d0d7d0926a015aa9a4940c14ebdd3 (diff) | |
download | bugzilla-ea25630305fbd3b55c142c32aab82f9cc7afccfa.tar.gz bugzilla-ea25630305fbd3b55c142c32aab82f9cc7afccfa.tar.xz |
Bug 509045: Make "use_keywords" a global template variable instead of having to pass it to templates all the time
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r-- | Bugzilla/Template.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 49954a521..22ea4b7cc 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -37,7 +37,9 @@ use strict; use Bugzilla::Bug; use Bugzilla::Constants; use Bugzilla::Install::Requirements; -use Bugzilla::Install::Util qw(install_string template_include_path include_languages); +use Bugzilla::Install::Util qw(install_string template_include_path + include_languages); +use Bugzilla::Keyword; use Bugzilla::Util; use Bugzilla::User; use Bugzilla::Error; @@ -752,6 +754,10 @@ sub create { return $cache->{template_bug_fields}; }, + # Whether or not keywords are enabled, in this Bugzilla. + 'use_keywords' => sub { return Bugzilla::Keyword->any_exist; }, + + # These don't work as normal constants. DB_MODULE => \&Bugzilla::Constants::DB_MODULE, REQUIRED_MODULES => |