]> git.sesse.net Git - ccbs/blobdiff - html/ccbs.pm
Multiple changes to make it possible to run www.positivegaming.com off the same code...
[ccbs] / html / ccbs.pm
index 5a2638681252f07b476bc9b4955e5c7e4c8fe853..9d5c44fd337008ea05f4329fcabf77b54a8a3bb1 100755 (executable)
@@ -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;