Bug 5917 - Switching the installer to use Template Toolkit
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
e8c983cda0
commit
d6b080ddd4
2 changed files with 11 additions and 23 deletions
|
@ -95,15 +95,6 @@ sub gettemplate {
|
|||
my $path = C4::Context->preference('intranet_includes') || 'includes';
|
||||
my $opacstylesheet = C4::Context->preference('opacstylesheet');
|
||||
my ( $htdocs, $theme, $lang, $filename ) = _get_template_file( $tmplbase, $interface, $query );
|
||||
|
||||
# my $template = HTML::Template::Pro->new(
|
||||
# filename => $filename,
|
||||
# die_on_bad_params => 1,
|
||||
# global_vars => 1,
|
||||
# case_sensitive => 1,
|
||||
# loop_context_vars => 1, # enable: __first__, __last__, __inner__, __odd__, __counter__
|
||||
# path => ["$htdocs/$theme/$lang/$path"]
|
||||
# );
|
||||
$filename =~ s/\.tmpl$/.tt/;
|
||||
my $template = C4::Templates->new( $interface, $filename);
|
||||
my $themelang=( $interface ne 'intranet' ? '/opac-tmpl' : '/intranet-tmpl' )
|
||||
|
|
|
@ -27,6 +27,7 @@ use Digest::MD5 qw(md5_base64);
|
|||
require Exporter;
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Templates;
|
||||
use C4::Koha;
|
||||
use CGI::Session;
|
||||
|
||||
|
@ -113,13 +114,12 @@ sub get_template_and_user {
|
|||
my $path =
|
||||
C4::Context->config('intrahtdocs') . "/prog/"
|
||||
. ( $language ? $language : "en" );
|
||||
my $template = HTML::Template::Pro->new(
|
||||
filename => "$path/modules/" . $in->{template_name},
|
||||
die_on_bad_params => 1,
|
||||
global_vars => 1,
|
||||
case_sensitive => 1,
|
||||
path => ["$path/includes"]
|
||||
);
|
||||
|
||||
my $filename = "$path/modules/" . $in->{template_name};
|
||||
$filename =~ s/\.tmpl$/.tt/;
|
||||
my $interface = 'intranet';
|
||||
my $template = C4::Templates->new( $interface, $filename);
|
||||
|
||||
|
||||
my ( $user, $cookie, $sessionID, $flags ) = checkauth(
|
||||
$in->{'query'},
|
||||
|
@ -355,13 +355,10 @@ sub checkauth {
|
|||
my $path =
|
||||
C4::Context->config('intrahtdocs') . "/prog/"
|
||||
. ( $query->param('language') ? $query->param('language') : "en" );
|
||||
my $template = HTML::Template::Pro->new(
|
||||
filename => "$path/modules/$template_name",
|
||||
die_on_bad_params => 1,
|
||||
global_vars => 1,
|
||||
case_sensitive => 1,
|
||||
path => ["$path/includes"]
|
||||
);
|
||||
my $filename = "$path/modules/$template_name";
|
||||
$filename =~ s/\.tmpl$/.tt/;
|
||||
my $interface = 'intranet';
|
||||
my $template = C4::Templates->new( $interface, $filename);
|
||||
$template->param(
|
||||
INPUTS => \@inputs,
|
||||
|
||||
|
|
Loading…
Reference in a new issue