summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-02-25 23:06:24 +0100
committerlpsolit%gmail.com <>2008-02-25 23:06:24 +0100
commit816eb1e9bd788b2b3468481281793639c824996d (patch)
tree9e272644a04e3dec038785e4d819ff9fe25fe1e6 /Bugzilla.pm
parent8ef50bdaba56ee100821c51ff141e00d26723dc7 (diff)
downloadbugzilla-816eb1e9bd788b2b3468481281793639c824996d.tar.gz
bugzilla-816eb1e9bd788b2b3468481281793639c824996d.tar.xz
Bug 415652: Implement Bugzilla->active_custom_fields - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm11
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 {