Added the "global_vars" option to the gettemplate sub.

This commit is contained in:
finlayt 2002-09-16 05:58:26 +00:00
parent 26aa0d906e
commit 6abefa4f11
1 changed files with 3 additions and 4 deletions

View File

@ -92,8 +92,9 @@ sub gettemplate {
my ($theme, $lang) = themelanguage($htdocs, $tmplbase);
my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$tmplbase",
die_on_bad_params => 0,
my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$tmplbase",
die_on_bad_params => 0,
global_vars => 1,
path => ["$htdocs/$theme/$lang/includes"]);
$template->param(themelang => "/$theme/$lang");
@ -135,7 +136,6 @@ sub themelanguage {
my ($lang) = $sth->fetchrow;
$sth->finish;
my @languages = split " ", $lang;
warn "Lang = @languages\n";
# theme preferences....
my $sth=$dbh->prepare("SELECT value FROM systempreferences WHERE variable='opacthemes'");
@ -143,7 +143,6 @@ sub themelanguage {
my ($theme) = $sth->fetchrow;
$sth->finish;
my @themes = split " ", $theme;
warn "Theme = @themes \n";
$dbh->disconnect;