From 6551fc7afae60f2a4e01bcfdbe68f9a560c10504 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 10 Jan 2012 10:20:08 +0100 Subject: [PATCH] Kosmetik --- SL/Form.pm | 26 +++++++++++--------------- bin/mozilla/io.pl | 1 - 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 537799a34..8bd11c3cf 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1107,9 +1107,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} = '>'; } @@ -1155,19 +1155,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 { @@ -1204,10 +1200,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}"; -- 2.20.1