]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Revert Revert "Anpassungen an neues SL::File::Object Interface"
authorMartin Helmling martin.helmling@octosoft.eu <martin.helmling@octosoft.eu>
Fri, 3 Feb 2017 07:34:26 +0000 (08:34 +0100)
committerMartin Helmling martin.helmling@octosoft.eu <martin.helmling@octosoft.eu>
Fri, 3 Feb 2017 07:34:26 +0000 (08:34 +0100)
Ă„nderungen in Dateien ohne Compilerfehler wieder dazu

SL/Controller/EmailJournal.pm
SL/Form.pm

index a4ffc62b591dda857c52e2ae81219eefa9a1e466..c818cc393de2b95d1c5cb5d9a0d4958002901b53 100644 (file)
@@ -69,7 +69,7 @@ sub action_download_attachment {
   my $ref = \$attachment->content;
   if ( $attachment->file_id > 0 ) {
     my $file = SL::File->get(id => $attachment->file_id );
   my $ref = \$attachment->content;
   if ( $attachment->file_id > 0 ) {
     my $file = SL::File->get(id => $attachment->file_id );
-    $ref = SL::File->get_content(dbfile => $file) if $file;
+    $ref = $file->get_content if $file;
   }
   $self->send_file($ref, name => $attachment->name, type => $attachment->mime_type);
 }
   }
   $self->send_file($ref, name => $attachment->name, type => $attachment->mime_type);
 }
index 644b9dbead7a36222070f265990105ef14216533..5424a7c923cbd2e6812b59471d953208c058ddeb 100644 (file)
@@ -1212,9 +1212,9 @@ sub send_email {
       }
     }
     foreach my $attfile ( @attfiles ) {
       }
     }
     foreach my $attfile ( @attfiles ) {
-      push @{ $mail->{attachments} }, { path => SL::File->get_file_path(dbfile => $attfile),
+      push @{ $mail->{attachments} }, { path => $attfile->get_file,
                                         id   => $attfile->id,
                                         id   => $attfile->id,
-                                        type => $attfile->file_mime_type,
+                                        type => $attfile->mime_type,
                                         name => $attfile->file_name };
     }
   }
                                         name => $attfile->file_name };
     }
   }