Template needs cgi to use it.

This commit is contained in:
Chris 2013-09-13 11:44:57 +01:00
parent b0458a66db
commit 2ae8e1431f
2 changed files with 3 additions and 1 deletions

View File

@ -160,6 +160,7 @@ sub run {
# Create the template handler object
$self -> {"template"} = Webperl::Template -> new(logger => $self -> {"logger"},
dbh => $self -> {"dbh"},
cgi => $self -> {"cgi"},
basedir => $self -> {"settings"} -> {"config"} -> {"template_dir"} || "templates",
timefmt => $self -> {"settings"} -> {"config"} -> {"timefmt"},
blockname => 1,

View File

@ -357,7 +357,8 @@ sub set_template_dir {
$self -> {"templatepath"} .= "/" unless($self -> {"templatepath"} =~ m|/$|); # templatepath must have trailing slash
# The URL...
$self -> {"templateurl"} = path_join($self -> {"cgi"} -> url(-base => 1), $self -> {"templatepath"});
$self -> {"templateurl"} = path_join($self -> {"cgi"} -> url(-base => 1), $self -> {"templatepath"})
if($self -> {"cgi"});
# And the common path, if possible
if($self -> {"fallback"}) {