From 4cfa70233e0a3d931adcbe78d2f8115f9523f263 Mon Sep 17 00:00:00 2001 From: finlayt Date: Thu, 12 Sep 2002 04:23:25 +0000 Subject: [PATCH] uses the gettemplate method from Output.pm now. Has only ten lines :-) --- tmpl/opacmain.pl | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/tmpl/opacmain.pl b/tmpl/opacmain.pl index 16264773b7..1683b7f9fa 100755 --- a/tmpl/opacmain.pl +++ b/tmpl/opacmain.pl @@ -1,24 +1,15 @@ #!/usr/bin/perl -use HTML::Template; # new Template use strict; require Exporter; -use C4::Database; # configfile -use C4::Output; # themelanguage -use CGI; # new CGI +use CGI; + +use C4::Output; # gettemplate use C4::Auth; # checkauth my $query = new CGI; -#my ($loggedinuser, $cookie, $sessionID) = checkauth($query); - -my $configfile = configfile(); - -my $htdocs = $configfile->{'opachtdocs'}; - -my $templatebase = "opac-main.tmpl"; -my ($theme, $lang) = themelanguage($htdocs, $templatebase); +my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 1); -my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$templatebase", die_on_bad_params => 0, path => ["$htdocs/includes"]); +my $template = gettemplate("opac-main.tmpl", "opac"); -#$template->param(SITE_RESULTS => $sitearray); print "Content-Type: text/html\n\n", $template->output; -- 2.39.5