summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@mozilla.com>2015-05-19 05:48:57 +0200
committerByron Jones <glob@mozilla.com>2015-05-19 05:48:57 +0200
commit64fd94e3c85af86131f34694a188aca380462f99 (patch)
treea97a8168b2bef327e9d0a005b0d5493d159d7ac5 /Bugzilla/Template.pm
parent1e23e69630c37096d05e9a3ef31e824e912987d3 (diff)
downloadbugzilla-64fd94e3c85af86131f34694a188aca380462f99.tar.gz
bugzilla-64fd94e3c85af86131f34694a188aca380462f99.tar.xz
Bug 1160430: Backport bug 69267 to BMO (Add the ability to deactivate keywords)
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 608d612b8..bc0d77084 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -1074,9 +1074,14 @@ sub create {
# Whether or not keywords are enabled, in this Bugzilla.
'use_keywords' => sub { return Bugzilla::Keyword->any_exist; },
- # All the keywords.
+ # All the keywords
'all_keywords' => sub { return Bugzilla::Keyword->get_all(); },
+ # All the active keywords
+ 'active_keywords' => sub {
+ return [grep { $_->is_active } Bugzilla::Keyword->get_all()];
+ },
+
'feature_enabled' => sub { return Bugzilla->feature(@_); },
# field_descs can be somewhat slow to generate, so we generate