Lines 32-44
our $refer = $query->param('url');
Link Here
|
32 |
$refer = $query->referer() if !$refer || $refer eq 'undefined'; |
32 |
$refer = $query->referer() if !$refer || $refer eq 'undefined'; |
33 |
|
33 |
|
34 |
$refer =~ /koha\/(.*)\.pl/; |
34 |
$refer =~ /koha\/(.*)\.pl/; |
35 |
my $from = "modules/help/$1.tt"; |
35 |
my $file = $1; |
|
|
36 |
$file =~ s/[^a-zA-Z0-9_\-\/]*//g; |
37 |
my $from = "modules/help/$file.tt"; |
36 |
|
38 |
|
37 |
my $htdocs = C4::Context->config('intrahtdocs'); |
39 |
my $htdocs = C4::Context->config('intrahtdocs'); |
38 |
my ( $theme, $lang ) = themelanguage( $htdocs, $from, "intranet", $query ); |
40 |
my ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); |
39 |
unless ( -e "$htdocs/$theme/$lang/$from" ) { |
41 |
unless ( -e "$htdocs/$theme/$lang/$from" ) { |
40 |
$from = "modules/help/nohelp.tt"; |
42 |
$from = "modules/help/nohelp.tt"; |
41 |
( $theme, $lang ) = themelanguage( $htdocs, $from, "intranet", $query ); |
43 |
( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); |
42 |
} |
44 |
} |
43 |
my $template = C4::Templates->new('intranet', "$htdocs/$theme/$lang/$from"); |
45 |
my $template = C4::Templates->new('intranet', "$htdocs/$theme/$lang/$from"); |
44 |
$template->param( referer => $refer ); |
46 |
$template->param( referer => $refer ); |
45 |
- |
|
|