parse_template erweitert um die Mgl. einen Dateinamen ($form->{attachment_filename...
authorUdo Spallek <info@wissensvermittlung.com>
Thu, 18 Jan 2007 16:21:51 +0000 (16:21 +0000)
committerUdo Spallek <info@wissensvermittlung.com>
Thu, 18 Jan 2007 16:21:51 +0000 (16:21 +0000)
das Attachmentfile anzugeben, der anders ist als $form->{tmpfile}

SL/Form.pm

index a575ea6..e0791c4 100644 (file)
@@ -868,10 +868,10 @@ sub parse_template {
           open(OUT, $self->{OUT})
             or $self->error($self->cleanup . "$self->{OUT} : $!");
         } else {
-
+          $self->{attachment_filename} = $self->{tmpfile} if ($self->{attachment_filename} eq '');
           # launch application
           print qq|Content-Type: | . $template->get_mime_type() . qq|
-Content-Disposition: attachment; filename="$self->{tmpfile}"
+Content-Disposition: attachment; filename="$self->{attachment_filename}"
 Content-Length: $numbytes
 
 |;