X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=html%2Fccbs.pm;h=9d5c44fd337008ea05f4329fcabf77b54a8a3bb1;hb=2eafc1f9109e3feea83e25667651c93bf2e24542;hp=5a2638681252f07b476bc9b4955e5c7e4c8fe853;hpb=1fff33ea074767eb32fef9b278d194d9f33bc69a;p=ccbs diff --git a/html/ccbs.pm b/html/ccbs.pm index 5a26386..9d5c44f 100755 --- a/html/ccbs.pm +++ b/html/ccbs.pm @@ -13,7 +13,6 @@ require '../intl/Sesse::GettextizeTemplates.pm'; require '../config.pm'; -r '../config.local.pm' and require '../config.local.pm'; -warn "Foo: " . $ccbs::config::lang; POSIX::setlocale( &POSIX::LC_CTYPE , $ccbs::config::lang ); POSIX::setlocale( &POSIX::LC_MESSAGES , $ccbs::config::lang ); Locale::gettext::bindtextdomain("ccbs", "po"); @@ -42,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; @@ -93,7 +92,7 @@ sub process_template { my $template = Template->new($config); my $output = ''; - $template->process('main.tmpl', $vars, \$output) + $template->process($ccbs::config::main_template, $vars, \$output) or die $template->error(); print $output;