aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@netscape.net>2017-08-01 16:37:44 +0200
committerFrédéric Buclin <LpSolit@netscape.net>2017-08-01 16:37:44 +0200
commit775362d8fb630da4fbb1e3f75c45183fd0a28667 (patch)
tree267323a27f46cecd5e1b544769912078fae2fb81 /Bugzilla/Template.pm
parent224a72476a50a3d3408adf5b1ed1c01bc48a7701 (diff)
downloadbugs-775362d8fb630da4fbb1e3f75c45183fd0a28667.tar
bugs-775362d8fb630da4fbb1e3f75c45183fd0a28667.tar.gz
bugs-775362d8fb630da4fbb1e3f75c45183fd0a28667.tar.bz2
bugs-775362d8fb630da4fbb1e3f75c45183fd0a28667.tar.xz
bugs-775362d8fb630da4fbb1e3f75c45183fd0a28667.zip
Backport upstream bug 69267: 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 41b9265c6..95882b65f 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -1122,11 +1122,16 @@ 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 [map { $_->name } Bugzilla::Keyword->get_all()];
},
+ # All the active keywords
+ 'active_keywords' => sub {
+ return [map { $_->name } grep { $_->is_active } Bugzilla::Keyword->get_all()];
+ },
+
'feature_enabled' => sub { return Bugzilla->feature(@_); },
# field_descs can be somewhat slow to generate, so we generate