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 git-svn-id: svn://10.0.0.236/trunk@200347 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user