Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a6873ed4

Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt

  • ID a6873ed48ebdaee1f5b1df63d431ccc54e829d7d
  • Vorgänger 08460123
  • Nachfolger 011e7aeb

copy_file_to_webdav_folder: Übergebenen Anhang-Name berücksichtigen

Unterschiede anzeigen:

SL/Common.pm
593 593
    return;
594 594
  }
595 595

  
596
  $form->{attachment_filename} ||= $form->generate_attachment_filename;
597

  
596 598
  my $timestamp =  get_current_formatted_time();
597
  my $new_file  =  File::Spec->catfile($form->{cwd}, $webdav_folder, $form->generate_attachment_filename());
599
  my $new_file  =  File::Spec->catfile($form->{cwd}, $webdav_folder, $form->{attachment_filename});
598 600
  $new_file =~ s{(.*)\.}{$1$timestamp\.};
599 601

  
600 602
  if (!File::Copy::copy($current_file, $new_file)) {
SL/Form.pm
857 857
  # therefore copy to webdav, even if we do not have the webdav feature enabled (just archive)
858 858
  my $copy_to_webdav =  $::instance_conf->get_webdav_documents && !$self->{preview} && $self->{tmpdir} && $self->{tmpfile} && $self->{type}
859 859
                        && $self->{type} ne 'statement';
860

  
861
  $self->{attachment_filename} ||= $self->generate_attachment_filename;
862

  
860 863
  if ( $ext_for_format eq 'pdf' && $self->doc_storage_enabled ) {
861 864
    $self->append_general_pdf_attachments(filepath =>  $self->{tmpdir}."/".$self->{tmpfile},
862 865
                                          type     =>  $self->{type});
......
873 876

  
874 877
    if (!$self->{preview} && $self->{attachment_type} !~ m{^dunning} && $self->doc_storage_enabled)
875 878
    {
876
      $self->{attachment_filename} ||= $self->generate_attachment_filename;
877 879
      $self->store_pdf($self);
878 880
    }
879 881
    $self->cleanup;
......
892 894
  }
893 895

  
894 896
  if ( !$self->{preview} && $ext_for_format eq 'pdf' && $self->{attachment_type} !~ m{^dunning} && $self->doc_storage_enabled) {
895
    $self->{attachment_filename} ||= $self->generate_attachment_filename;
896 897
    my $file_obj = $self->store_pdf($self);
897 898
    $self->{print_file_id} = $file_obj->id if $file_obj;
898 899
  }

Auch abrufbar als: Unified diff