Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 46d48c74

Von Jan Büren vor etwa 1 Monat hinzugefügt

  • ID 46d48c742e46301d81da324e36a60c22578e8461
  • Vorgänger c17045ff
  • Nachfolger 08ed7551

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