From: Moritz Bunkus Date: Tue, 10 Jan 2012 09:20:08 +0000 (+0100) Subject: Kosmetik X-Git-Tag: release-2.7.0beta1~77 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=02cb7e02771247f3106001076366d119277a7d30;p=kivitendo-erp.git Kosmetik --- diff --git a/SL/Form.pm b/SL/Form.pm index 0c291dabe..58b1973aa 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1106,9 +1106,9 @@ sub parse_template { close $temp_fh; if ($template->uses_temp_file() || $self->{media} eq 'email') { - $out = $self->{OUT}; - $out_mode = $self->{OUT_MODE} || '>'; - $self->{OUT} = "$self->{tmpfile}"; + $out = $self->{OUT}; + $out_mode = $self->{OUT_MODE} || '>'; + $self->{OUT} = "$self->{tmpfile}"; $self->{OUT_MODE} = '>'; } @@ -1154,19 +1154,15 @@ sub parse_template { # if we send html or plain text inline if (($self->{format} eq 'html') && ($self->{sendmode} eq 'inline')) { - $mail->{contenttype} = "text/html"; - - $mail->{message} =~ s/\r//g; - $mail->{message} =~ s/\n/
\n/g; - $myconfig->{signature} =~ s/\n/
\n/g; - $mail->{message} .= "
\n--
\n$myconfig->{signature}\n
"; + $mail->{contenttype} = "text/html"; + $mail->{message} =~ s/\r//g; + $mail->{message} =~ s/\n/
\n/g; + $myconfig->{signature} =~ s/\n/
\n/g; + $mail->{message} .= "
\n--
\n$myconfig->{signature}\n
"; open(IN, "<", $self->{tmpfile}) or $self->error($self->cleanup . "$self->{tmpfile} : $!"); - while () { - $mail->{message} .= $_; - } - + $mail->{message} .= $_ while ; close(IN); } else { @@ -1203,10 +1199,10 @@ sub parse_template { #print(STDERR "OUT $self->{OUT}\n"); for my $i (1 .. $self->{copies}) { if ($self->{OUT}) { - open OUT, $self->{OUT_MODE}, $self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!"); + open OUT, $self->{OUT_MODE}, $self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!"); print OUT $_ while ; close OUT; - seek IN, 0, 0; + seek IN, 0, 0; } else { $self->{attachment_filename} = ($self->{attachment_filename}) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 18058437f..7627da1cf 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1517,7 +1517,6 @@ sub print_form { delete $form->{OUT}; if ($form->{media} eq 'printer') { - #$form->{OUT} = "| $form->{printer_command} &>/dev/null"; $form->{OUT} = $form->{printer_command}; $form->{OUT_MODE} = '|-'; $form->{printed} .= " $form->{formname}";