X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=index.pl;h=abedcdfc83464c5e4247414554705069be8e50e9;hb=3bed0704bb7fa0d3b6b8e8501b8ca6bbca7762bd;hp=f9a534539ba86c8d1272a8feb00be22db666af47;hpb=7a75ed412208e6cd5f0720026a94dc21bb5e62c2;p=ndwebbie.git diff --git a/index.pl b/index.pl index f9a5345..abedcdf 100755 --- a/index.pl +++ b/index.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -w -T #************************************************************************** # Copyright (C) 2006 by Michael Andreen * # * @@ -25,15 +25,15 @@ use DBI; use DBD::Pg qw(:pg_types); use strict; - my $cgi = new CGI; - -chdir $ENV{'DOCUMENT_ROOT'}; - our $DBH = undef; our $USER = $ENV{'REMOTE_USER'}; my $error; +if ($ENV{'DOCUMENT_ROOT'} =~ m{((\w|/)+)}){ + chdir $1; +} + our $TEMPLATE = HTML::Template->new(filename => 'templates/skel.tmpl', global_vars => 1); for my $file ("db.pl","include.pl"){