From 568004bad2ee44969edd1f484d8020f4433dc233 Mon Sep 17 00:00:00 2001 From: "Martin Helmling martin.helmling@octosoft.eu" Date: Fri, 3 Feb 2017 08:34:26 +0100 Subject: [PATCH] Revert Revert "Anpassungen an neues SL::File::Object Interface" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Änderungen in Dateien ohne Compilerfehler wieder dazu --- SL/Controller/EmailJournal.pm | 2 +- SL/Form.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/Controller/EmailJournal.pm b/SL/Controller/EmailJournal.pm index a4ffc62b5..c818cc393 100644 --- a/SL/Controller/EmailJournal.pm +++ b/SL/Controller/EmailJournal.pm @@ -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 ); - $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); } diff --git a/SL/Form.pm b/SL/Form.pm index 644b9dbea..5424a7c92 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1212,9 +1212,9 @@ sub send_email { } } 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, - type => $attfile->file_mime_type, + type => $attfile->mime_type, name => $attfile->file_name }; } } -- 2.20.1