summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Constants.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Constants.pm')
-rw-r--r--Bugzilla/Constants.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm
index d58fe9388..2285f89b0 100644
--- a/Bugzilla/Constants.pm
+++ b/Bugzilla/Constants.pm
@@ -35,6 +35,7 @@ use base qw(Exporter);
# For bz_locations
use File::Basename;
+use Memoize;
@Bugzilla::Constants::EXPORT = qw(
BUGZILLA_VERSION
@@ -404,11 +405,11 @@ use constant EMPTY_DATETIME_REGEX => qr/^[0\-:\sA-Za-z]+$/;
# See the POD for Bugzilla::Field/is_abnormal to see why these are listed
# here.
-use constant ABNORMAL_SELECTS => qw(
- classification
- product
- component
-);
+use constant ABNORMAL_SELECTS => {
+ classification => 1,
+ component => 1,
+ product => 1,
+};
# The fields from fielddefs that are blocked from non-timetracking users.
# work_time is sometimes called actual_time.
@@ -619,4 +620,8 @@ sub bz_locations {
};
}
+# This makes us not re-compute all the bz_locations data every time it's
+# called.
+BEGIN { memoize('bz_locations') };
+
1;