From 2b281b9236c2b6aae61081717ea6210900f0dbbe Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 17 Jul 2005 14:59:44 +0000 Subject: [PATCH] Move the database config into config.pm. --- config.pm | 6 ++++++ html/ccbs.pm | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.pm b/config.pm index 1354475..cfb12ba 100644 --- a/config.pm +++ b/config.pm @@ -12,5 +12,11 @@ our $dbdebug = 0; # Set this flag to disable any admin tasks -- it's quite crude, but hey :-) our $noadmin = 0; +# The database connection details +our $dbname = "ccbs"; +our $dbhost = "www.positivegaming.com"; +our $dbuser = "ccbs"; +our $dbpass = "GeT|>>B_"; + 1; diff --git a/html/ccbs.pm b/html/ccbs.pm index 3fdf3a5..cd71ce8 100755 --- a/html/ccbs.pm +++ b/html/ccbs.pm @@ -41,7 +41,7 @@ sub print_see_other { } sub db_connect { - my $dbh = DBI->connect("dbi:Pg:dbname=ccbs;host=www.positivegaming.com", "ccbs", "GeT|>>B_") + my $dbh = DBI->connect("dbi:Pg:dbname=$ccbs::config::dbname;host=$ccbs::config::dbhost", $ccbs::config::dbuser, $ccbs::config::dbpass) or die "Couldn't connect to database"; $dbh->{RaiseError} = 1; return $dbh; -- 2.39.2