Revision c9b4e6bc
Von Martin Helmling martin.helmling@octosoft.eu vor mehr als 7 Jahren hinzugefügt
SL/Helper/File.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use Exporter 'import'; |
6 |
our @EXPORT_OK = qw(store_pdf append_general_pdf_attachments); |
|
6 |
our @EXPORT_OK = qw(store_pdf append_general_pdf_attachments doc_storage_enabled);
|
|
7 | 7 |
our %EXPORT_TAGS = (all => \@EXPORT_OK,); |
8 | 8 |
use SL::File; |
9 | 9 |
|
10 |
sub doc_storage_enabled { |
|
11 |
return 0 unless $::instance_conf->get_doc_storage; |
|
12 |
return 1 if $::instance_conf->get_doc_storage_for_documents eq 'Filesystem' && $::instance_conf->get_doc_files; |
|
13 |
return 1 if $::instance_conf->get_doc_storage_for_documents eq 'Webdav' && $::instance_conf->get_doc_webdav; |
|
14 |
return 0; |
|
15 |
} |
|
16 |
|
|
10 | 17 |
sub store_pdf { |
11 | 18 |
my ($self, $form) = @_; |
12 |
return unless $::instance_conf->get_doc_storage;
|
|
19 |
return unless $self->doc_storage_enabled;
|
|
13 | 20 |
my $type = $form->{type}; |
14 | 21 |
$type = $form->{formname} if $form->{formname} && !$form->{type}; |
15 | 22 |
$type = $form->{attachment_type} if $form->{attachment_type}; |
... | ... | |
72 | 79 |
|
73 | 80 |
SL::Helper::File - Helper for $::Form to store generated PDF-Documents |
74 | 81 |
|
75 |
|
|
76 | 82 |
=head1 SYNOPSIS |
77 | 83 |
|
78 | 84 |
# This Helper is used by SL::Form to store new generated PDF-Files and append general attachments to this documents. |
Auch abrufbar als: Unified diff
Filemanagement: Zentralisierte Prüfung ob bei Drucken im DMS gespeichert wird
Prüfung aller Mandanteneinstellung vor Speicherung im DMS,
fixt #286