From df50ddd58380e012429417f65026267727a61899 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 11 May 2017 13:00:32 +0200 Subject: [PATCH] =?utf8?q?Druckfunktion:=20beim=20Debuggen=20tempor=C3=A4r?= =?utf8?q?e=20Datei=20f=C3=BCr=20alle=20lesbar=20machen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SL/Form.pm b/SL/Form.pm index 3e0c34395..470809f77 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1023,6 +1023,8 @@ sub parse_template { # OUT is used for the media, screen, printer, email # for postscript we store a copy in a temporary file + my $keep_temp_files = $::lx_office_conf{debug} && $::lx_office_conf{debug}->{keep_temp_files}; + my ($temp_fh, $suffix); $suffix = $self->{IN}; $suffix =~ s/.*\.//; @@ -1030,9 +1032,10 @@ sub parse_template { strftime('kivitendo-print-%Y%m%d%H%M%S-XXXXXX', localtime()), SUFFIX => '.' . ($suffix || 'tex'), DIR => $userspath, - UNLINK => ($::lx_office_conf{debug} && $::lx_office_conf{debug}->{keep_temp_files})? 0 : 1, + UNLINK => $keep_temp_files ? 0 : 1, ); close $temp_fh; + chmod 0644, $self->{tmpfile} if $keep_temp_files; (undef, undef, $self->{template_meta}{tmpfile}) = File::Spec->splitpath( $self->{tmpfile} ); $out = $self->{OUT}; -- 2.20.1