Lines 117-123
sub get_template_and_user {
Link Here
|
117 |
$tmplbase=~ s/\.tmpl$/.tt/; |
117 |
$tmplbase=~ s/\.tmpl$/.tt/; |
118 |
my $filename = "$path/modules/" . $tmplbase; |
118 |
my $filename = "$path/modules/" . $tmplbase; |
119 |
my $interface = 'intranet'; |
119 |
my $interface = 'intranet'; |
120 |
my $template = C4::Templates->new( $interface, $filename, $tmplbase); |
120 |
my $template = C4::Templates->new( $interface, $filename, $tmplbase, $query); |
121 |
|
121 |
|
122 |
my ( $user, $cookie, $sessionID, $flags ) = checkauth( |
122 |
my ( $user, $cookie, $sessionID, $flags ) = checkauth( |
123 |
$in->{'query'}, |
123 |
$in->{'query'}, |
Lines 158-169
sub get_template_and_user {
Link Here
|
158 |
} |
158 |
} |
159 |
|
159 |
|
160 |
sub _get_template_language { |
160 |
sub _get_template_language { |
161 |
#verify if opac language exists in staff (bug 5660) |
161 |
|
162 |
#conditions are 1) dir exists and 2) enabled in prefs |
162 |
#verify if opac language exists in staff (bug 5660) |
163 |
my ($opaclang)= @_; |
163 |
#conditions are 1) dir exists and 2) enabled in prefs |
164 |
return 'en' unless $opaclang; |
164 |
my ($opaclang) = @_; |
165 |
my $path= C4::Context->config('intrahtdocs')."/prog/$opaclang"; |
165 |
return 'en' unless $opaclang; |
166 |
-d $path ? $opaclang : 'en'; |
166 |
$opaclang =~ s/[^a-zA-Z_-]*//g; |
|
|
167 |
my $path = C4::Context->config('intrahtdocs') . "/prog/$opaclang"; |
168 |
-d $path ? $opaclang : 'en'; |
167 |
} |
169 |
} |
168 |
|
170 |
|
169 |
=item checkauth |
171 |
=item checkauth |
Lines 365-371
sub checkauth {
Link Here
|
365 |
my $filename = "$path/modules/$template_name"; |
367 |
my $filename = "$path/modules/$template_name"; |
366 |
$filename =~ s/\.tmpl$/.tt/; |
368 |
$filename =~ s/\.tmpl$/.tt/; |
367 |
my $interface = 'intranet'; |
369 |
my $interface = 'intranet'; |
368 |
my $template = C4::Templates->new( $interface, $filename); |
370 |
my $template = C4::Templates->new( $interface, $filename, '', $query); |
369 |
$template->param( |
371 |
$template->param( |
370 |
INPUTS => \@inputs, |
372 |
INPUTS => \@inputs, |
371 |
|
373 |
|
372 |
- |
|
|