X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/1e25131315e72036aa6df1d626011a761218d233..03b964b2afb0c72dd54688e08a6dda47a1bdfee9:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index c4c7951f9..196d828cd 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -591,7 +591,9 @@ sub parse_html_template2 { map { $additional_params->{$_} ||= $self->{$_} } keys %{ $self }; my $output; - $template->process($file, $additional_params, \$output); + if (!$template->process($file, $additional_params, \$output)) { + print STDERR $template->error(); + } $output = $main::locale->{iconv}->convert($output) if ($main::locale); @@ -758,6 +760,22 @@ sub format_amount { return $amount; } # + +sub format_string { + $main::lxdebug->enter_sub(2); + + my $self = shift; + my $input = shift; + + $input =~ s/(^|[^\#]) \# (\d+) /$1$_[$2 - 1]/gx; + $input =~ s/(^|[^\#]) \#\{(\d+)\}/$1$_[$2 - 1]/gx; + $input =~ s/\#\#/\#/g; + + $main::lxdebug->leave_sub(2); + + return $input; +} + sub parse_amount { $main::lxdebug->enter_sub(2);