diff options
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index c77c039ce..e35c75934 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -430,10 +430,13 @@ sub get_fields { return @$fields; } -sub custom_field_names { - # Get a list of custom fields and convert it into a list of their names. - return map($_->{name}, - @{Bugzilla::Field->match({ custom=>1, obsolete=>0 })}); +sub active_custom_fields { + my $class = shift; + if (!exists $class->request_cache->{active_custom_fields}) { + $class->request_cache->{active_custom_fields} = + Bugzilla::Field->match({ custom => 1, obsolete => 0 }); + } + return @{$class->request_cache->{active_custom_fields}}; } sub hook_args { |