summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-08-01 07:15:55 +0200
committermkanat%bugzilla.org <>2006-08-01 07:15:55 +0200
commit18c57070565d1218935168b437f4adcfe9b38ce4 (patch)
treecd5b3166102f888321e5a8823c9ad80fb5bd5000 /Bugzilla.pm
parentec147c3f721ff20d6fa61fea42627b9acb7b0ea3 (diff)
downloadbugzilla-18c57070565d1218935168b437f4adcfe9b38ce4.tar.gz
bugzilla-18c57070565d1218935168b437f4adcfe9b38ce4.tar.xz
Bug 346483: Fix up param-updating code in checksetup.pl to all be in a module.
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=myk
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();
}