From 6abefa4f11083652a97ead2c2468a4e40bd0bee9 Mon Sep 17 00:00:00 2001 From: finlayt Date: Mon, 16 Sep 2002 05:58:26 +0000 Subject: [PATCH] Added the "global_vars" option to the gettemplate sub. --- C4/Output.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/C4/Output.pm b/C4/Output.pm index 9aea6f1dfa..5e99cfc89d 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -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;