X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/22ac8f4a3d23f7014fdc28ef50decd1026acbd5e..db96eb0c952d33f9e27f5fb0e72da18fc653a71d:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index fe9d2b862..b7b76e4c2 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -783,7 +783,16 @@ sub parse_template { $par = ""; $var = $_; - + + # Switch <%analyse%> for template checking + # If <%analyse%> is set in the template, you'll find the + # parsed output in the user Directory for analysing + # Latex errors + # <%analyse%> is a switch (allways off, on if set), not a Variable + # Set $form->{analysing}="" for system state: never analyse. + # Set $form->{analysing}="1" for system state: ever analyse. + $self->{analysing} = "1" if (/<%analyse%>/ && !defined $self->{analysing}); + $two_passes = 1 if (/\\pageref/); # { Moritz Bunkus @@ -1108,12 +1117,14 @@ sub cleanup { close(FH); } - if ($self->{tmpfile}) { + if ($self->{analysing} eq "") { + if ($self->{tmpfile}) { - # strip extension - $self->{tmpfile} =~ s/\.\w+$//g; - my $tmpfile = $self->{tmpfile}; - unlink(<$tmpfile.*>); + # strip extension + $self->{tmpfile} =~ s/\.\w+$//g; + my $tmpfile = $self->{tmpfile}; + unlink(<$tmpfile.*>); + } } chdir("$self->{cwd}");