Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fe681ce4

Von Jan Büren vor 7 Monaten hinzugefügt

  • ID fe681ce4b0829871ef7755e11162a0d9be35d403
  • Vorgänger e823b5d6
  • Nachfolger ca3b14ff

DMS Backend Filesystem Metadaten für Version beim Speichern mitgeben

Unterschiede anzeigen:

SL/File/Backend/Filesystem.pm
4 4

  
5 5
use parent qw(SL::File::Backend);
6 6
use SL::DB::File;
7

  
7 8
use File::Copy;
8 9
use File::Slurp;
9 10
use File::stat;
10 11
use File::Path qw(make_path);
12
use UUID::Tiny ':std';
11 13

  
12 14
#
13 15
# public methods
......
90 92
    print OUT $params{file_contents};
91 93
    close(OUT);
92 94
  }
95
  my $doc_path = $::lx_office_conf{paths}->{document_path};
96
  my $rel_file = $tofile;
97
  $rel_file    =~ s/$doc_path//;
98

  
99
  my $fv = SL::DB::FileVersion->new(
100
                            file_id       => $dbfile->id,
101
                            version       => $dbfile->backend_data,
102
                            file_location => $rel_file,
103
                            doc_path      => $doc_path,
104
                            backend       => 'Filesystem',
105
                            guid          => create_uuid_as_string(UUID_V4),
106
                          )->save;
93 107
  if ($params{mtime}) {
94 108
    utime($params{mtime}, $params{mtime}, $tofile);
95 109
  }

Auch abrufbar als: Unified diff