diff options
author | Frédéric Buclin <LpSolit@netscape.net> | 2017-08-01 16:37:44 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@netscape.net> | 2017-08-01 16:37:44 +0200 |
commit | 775362d8fb630da4fbb1e3f75c45183fd0a28667 (patch) | |
tree | 267323a27f46cecd5e1b544769912078fae2fb81 /Bugzilla/Template.pm | |
parent | 224a72476a50a3d3408adf5b1ed1c01bc48a7701 (diff) | |
download | bugs-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.pm | 7 |
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 |