summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm24
1 files changed, 2 insertions, 22 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 0ffa1d1b9..3d8215937 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -25,6 +25,7 @@ package Bugzilla;
use strict;
+use Bugzilla::Config;
use Bugzilla::Constants;
use Bugzilla::Auth;
use Bugzilla::Auth::Persist::Cookie;
@@ -147,7 +148,7 @@ sub cgi {
sub params {
my $class = shift;
- request_cache()->{params} ||= _load_param_values();
+ request_cache()->{params} ||= Bugzilla::Config::read_param_file();
return request_cache()->{params};
}
@@ -346,27 +347,6 @@ sub _cleanup {
undef $_request_cache;
}
-sub _load_param_values {
- my %params;
- my $datadir = bz_locations()->{'datadir'};
- if (-e "$datadir/params") {
- # Note that checksetup.pl sets file permissions on '$datadir/params'
-
- # Using Safe mode is _not_ a guarantee of safety if someone does
- # manage to write to the file. However, it won't hurt...
- # See bug 165144 for not needing to eval this at all
- my $s = new Safe;
-
- $s->rdo("$datadir/params");
- die "Error reading $datadir/params: $!" if $!;
- die "Error evaluating $datadir/params: $@" if $@;
-
- # Now read the param back out from the sandbox
- %params = %{$s->varglob('param')};
- }
- return \%params;
-}
-
sub END {
_cleanup();
}