X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/974b5d8664caba8cebfccc55b1be53a09916a200..064232d4775f547c5a571572ff48252a9bb7089d:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index 5a5005eff..a11122c49 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -508,7 +508,6 @@ sub parse_html_template { $additional_params->{"myconfig_jsc_dateformat"} = $jsc_dateformat; } - $additional_params->{"conf_jscalendar"} = $main::jscalendar; $additional_params->{"conf_lizenzen"} = $main::lizenzen; $additional_params->{"conf_latex_templates"} = $main::latex; $additional_params->{"conf_opendocument_templates"} = $main::opendocument_templates; @@ -776,7 +775,18 @@ sub parse_template { # OUT is used for the media, screen, printer, email # for postscript we store a copy in a temporary file my $fileid = time; - $self->{tmpfile} ||= "$userspath/${fileid}.$self->{IN}"; + my $prepend_userspath; + + if (!$self->{tmpfile}) { + $self->{tmpfile} = "${fileid}.$self->{IN}"; + $prepend_userspath = 1; + } + + $prepend_userspath = 1 if substr($self->{tmpfile}, 0, length $userspath) eq $userspath; + + $self->{tmpfile} =~ s|.*/||; + $self->{tmpfile} =~ s/[^a-zA-Z0-9\._\ \-]//g; + $self->{tmpfile} = "$userspath/$self->{tmpfile}" if $prepend_userspath; if ($template->uses_temp_file() || $self->{media} eq 'email') { $out = $self->{OUT};