From f4b68a7889401918484f2c887bad80190d9bac01 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 7 Nov 2012 15:45:46 +0100 Subject: [PATCH] Refactoring; Kosmetik: Ausrichtung --- bin/mozilla/io.pl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 467092e6f..698758ebe 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1541,18 +1541,21 @@ sub print_form { my $filename; my $suffix = ($form->{postscript}) ? '.ps' : '.pdf'; if ($filename = $queued{ $form->{formname} }) { - $form->{queued} =~ s/\Q$form->{formname} $filename\E//; unlink $::lx_office_conf{paths}->{spool} . "/$filename"; - $filename =~ s/\..*$//g; - $filename .= $suffix; - $form->{OUT} = $::lx_office_conf{paths}->{spool} . "/$filename"; - $form->{OUT_MODE} = '>'; + delete $queued{ $form->{formname} }; + + $form->{queued} = join ' ', %queued; + $filename =~ s/\..*$//g; + $filename .= $suffix; + $form->{OUT} = $::lx_office_conf{paths}->{spool} . "/$filename"; + $form->{OUT_MODE} = '>'; + } else { my $temp_fh; ($temp_fh, $filename) = File::Temp::tempfile( 'kivitendo-spoolXXXXXX', SUFFIX => "$suffix", - DIR => $::lx_office_conf{paths}->{spool}, + DIR => $::lx_office_conf{paths}->{spool}, UNLINK => 0, ); close $temp_fh; -- 2.20.1