]> git.sesse.net Git - ccbs/commitdiff
Move the database config into config.pm.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 17 Jul 2005 14:59:44 +0000 (14:59 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 17 Jul 2005 14:59:44 +0000 (14:59 +0000)
config.pm
html/ccbs.pm

index 13544753222344d62877c215dcd6f30cfedea579..cfb12ba43529d96b2b990e8495f301b374bc5c23 100644 (file)
--- 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;
 
index 3fdf3a5fc85b84c2c521954fb030ef30658f72cb..cd71ce8aeb6f68b3ee318ee5464b03a436b79f1a 100755 (executable)
@@ -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;