From 8864a76cbd34aee803ced85fc771418d3ea620e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 12 Jul 2017 12:43:53 +0200 Subject: [PATCH] Belege email dialog: Ohne id nicht nach zu sendenden Dateien suchen. --- bin/mozilla/io.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 671cbb04f..9f49b7340 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1954,10 +1954,12 @@ sub _get_files_for_email_dialog { return %files if !$::instance_conf->get_doc_storage; - $files{versions} = [ SL::File->get_all_versions(object_id => $::form->{id}, object_type => $::form->{type}, file_type => 'document') ]; - $files{files} = [ SL::File->get_all( object_id => $::form->{id}, object_type => $::form->{type}, file_type => 'attachment') ]; - $files{vc_files} = [ SL::File->get_all( object_id => $::form->{vc_id}, object_type => $::form->{vc}, file_type => 'attachment') ] - if $::form->{vc} && $::form->{"vc_id"}; + if ($::form->{id}) { + $files{versions} = [ SL::File->get_all_versions(object_id => $::form->{id}, object_type => $::form->{type}, file_type => 'document') ]; + $files{files} = [ SL::File->get_all( object_id => $::form->{id}, object_type => $::form->{type}, file_type => 'attachment') ]; + $files{vc_files} = [ SL::File->get_all( object_id => $::form->{vc_id}, object_type => $::form->{vc}, file_type => 'attachment') ] + if $::form->{vc} && $::form->{"vc_id"}; + } my @parts = uniq_by { $_->{id} } -- 2.20.1