Commit ff238d36 authored by tara%tequilarista.org's avatar tara%tequilarista.org

correcting scope

parent bac12bd6
...@@ -54,10 +54,10 @@ sub globals_pl_sillyness { ...@@ -54,10 +54,10 @@ sub globals_pl_sillyness {
# here # here
# #
my $db_host = "localhost"; $::db_host = "localhost";
my $db_name = "bugs"; $::db_name = "bugs";
my $db_user = "bugs"; $::db_user = "bugs";
my $db_pass = ""; $::db_pass = "";
do 'localconfig'; do 'localconfig';
...@@ -84,13 +84,13 @@ $::superusergroupset = "9223372036854775807"; ...@@ -84,13 +84,13 @@ $::superusergroupset = "9223372036854775807";
sub ConnectToDatabase { sub ConnectToDatabase {
my ($useshadow) = (@_); my ($useshadow) = (@_);
if (!defined $::db) { if (!defined $::db) {
my $name = $db_name; my $name = $::db_name;
if ($useshadow && Param("shadowdb") && Param("queryagainstshadowdb")) { if ($useshadow && Param("shadowdb") && Param("queryagainstshadowdb")) {
$name = Param("shadowdb"); $name = Param("shadowdb");
$::dbwritesallowed = 0; $::dbwritesallowed = 0;
} }
$::db = DBI->connect("DBI:mysql:host=$db_host;database=$name", $db_user, $db_pass) $::db = DBI->connect("DBI:mysql:host=$::db_host;database=$name", $::db_user, $::db_pass)
|| die "Can't connect to database server."; || die "Can't connect to database server.\n";
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment