projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3afca6a
)
Druckfunktion: beim Debuggen temporäre Datei für alle lesbar machen
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 11 May 2017 11:00:32 +0000
(13:00 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 20 Jul 2017 06:46:31 +0000
(08:46 +0200)
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
3e0c343
..
470809f
100644
(file)
--- 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
# 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/.*\.//;
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,
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;
);
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};
(undef, undef, $self->{template_meta}{tmpfile}) = File::Spec->splitpath( $self->{tmpfile} );
$out = $self->{OUT};