]> git.sesse.net Git - ccbs/blobdiff - html/ccbs.pm
Fix a typo in index.tmpl.
[ccbs] / html / ccbs.pm
index 5a2638681252f07b476bc9b4955e5c7e4c8fe853..7940dd92fbf028514947221cca49709e609c4a11 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;
@@ -80,7 +79,7 @@ sub process_template {
        my ($page, $title, $vars) = @_;
        $vars->{'page'} = $page;
        $vars->{'title'} = $title;
-       $vars->{'public'} = $config::ccbs::noadmin;
+       $vars->{'public'} = $ccbs::config::noadmin;
        $vars->{'timetogenerate'} = sprintf "%.3f", Time::HiRes::tv_interval($start_time);
        
        my $config = {
@@ -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;