Kosmetik
authorMoritz Bunkus <moritz@bunkus.org>
Tue, 10 Jan 2012 09:20:08 +0000 (10:20 +0100)
committerMoritz Bunkus <moritz@bunkus.org>
Tue, 10 Jan 2012 09:20:08 +0000 (10:20 +0100)
SL/Form.pm
bin/mozilla/io.pl

index 0c291da..58b1973 100644 (file)
@@ -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/<br>\n/g;
-        $myconfig->{signature} =~ s/\n/<br>\n/g;
-        $mail->{message} .= "<br>\n-- <br>\n$myconfig->{signature}\n<br>";
+        $mail->{contenttype}    =  "text/html";
+        $mail->{message}        =~ s/\r//g;
+        $mail->{message}        =~ s/\n/<br>\n/g;
+        $myconfig->{signature}  =~ s/\n/<br>\n/g;
+        $mail->{message}       .=  "<br>\n-- <br>\n$myconfig->{signature}\n<br>";
 
         open(IN, "<", $self->{tmpfile})
           or $self->error($self->cleanup . "$self->{tmpfile} : $!");
-        while (<IN>) {
-          $mail->{message} .= $_;
-        }
-
+        $mail->{message} .= $_ while <IN>;
         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 <IN>;
           close OUT;
-          seek IN, 0, 0;
+          seek  IN, 0, 0;
 
         } else {
           $self->{attachment_filename} = ($self->{attachment_filename})
index 1805843..7627da1 100644 (file)
@@ -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}";