From 2545c0950c4f0fde8f78b265217fa9f523eff7bf Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 20 Jun 2006 03:15:17 +0000 Subject: Bug 304601: Bugzilla::Config's :locations exports need to be in their own module - Patch by Frédéric Buclin r=mkanat for the main patch, r=myk for the patch about CGI.pm a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug 328637: Remove all legal_* versioncache arrays - Patch by Frédéric Buclin r=mkanat a=justdave Bug 110503 - Eliminate versioncache --- Bugzilla.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index fc2ef8af5..ea7740151 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -25,11 +25,10 @@ package Bugzilla; use strict; +use Bugzilla::Constants; use Bugzilla::Auth; use Bugzilla::Auth::Persist::Cookie; use Bugzilla::CGI; -use Bugzilla::Config qw(:DEFAULT :locations); -use Bugzilla::Constants; use Bugzilla::DB; use Bugzilla::Template; use Bugzilla::User; @@ -175,7 +174,7 @@ sub login { my $authorizer = new Bugzilla::Auth(); $type = LOGIN_REQUIRED if Bugzilla->cgi->param('GoAheadAndLogIn'); if (!defined $type || $type == LOGIN_NORMAL) { - $type = Param('requirelogin') ? LOGIN_REQUIRED : LOGIN_NORMAL; + $type = Bugzilla->params->{'requirelogin'} ? LOGIN_REQUIRED : LOGIN_NORMAL; } my $authenticated_user = $authorizer->login($type); @@ -274,7 +273,7 @@ sub switch_to_shadow_db { my $class = shift; if (!$_dbh_shadow) { - if (Param('shadowdb')) { + if (Bugzilla->params->{'shadowdb'}) { $_dbh_shadow = Bugzilla::DB::connect_shadow(); } else { $_dbh_shadow = $_dbh_main; @@ -329,7 +328,7 @@ sub _cleanup { # When we support transactions, need to ->rollback here $_dbh_main->disconnect if $_dbh_main; - $_dbh_shadow->disconnect if $_dbh_shadow and Param("shadowdb"); + $_dbh_shadow->disconnect if $_dbh_shadow && Bugzilla->params->{"shadowdb"}; undef $_dbh_main; undef $_dbh_shadow; undef $_dbh; @@ -337,6 +336,7 @@ sub _cleanup { 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' -- cgit v1.2.3-24-g4f1b