summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-06-20 05:15:17 +0200
committerlpsolit%gmail.com <>2006-06-20 05:15:17 +0200
commit2545c0950c4f0fde8f78b265217fa9f523eff7bf (patch)
tree5bb305644ad11da196c7613b82743e426e2fd337 /Bugzilla.pm
parentb687ddef9b6dfeec3d87b7ae211decbf21b6e9a9 (diff)
downloadbugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.tar.gz
bugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.tar.xz
Bug 304601: Bugzilla::Config's :locations exports need to be in their own module - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat for the main patch, r=myk for the patch about CGI.pm a=justdave
Bug 328637: Remove all legal_* versioncache arrays - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave Bug 110503 - Eliminate versioncache
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm10
1 files changed, 5 insertions, 5 deletions
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'