Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 82183ebc

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

  • ID 82183ebc46191280976da40c6160f3664a77b8be
  • Vorgänger 28025b0d
  • Nachfolger 1dd06079

DMS Backend Filesystem Metadaten für Version beim Speichern mitgeben

Unterschiede anzeigen:

SL/File/Backend/Filesystem.pm
use parent qw(SL::File::Backend);
use SL::DB::File;
use File::Copy;
use File::Slurp;
use File::stat;
use File::Path qw(make_path);
use UUID::Tiny ':std';
#
# public methods
......
print OUT $params{file_contents};
close(OUT);
}
my $doc_path = $::lx_office_conf{paths}->{document_path};
my $rel_file = $tofile;
$rel_file =~ s/$doc_path//;
my $fv = SL::DB::FileVersion->new(
file_id => $dbfile->id,
version => $dbfile->backend_data,
file_location => $rel_file,
doc_path => $doc_path,
backend => 'Filesystem',
guid => create_uuid_as_string(UUID_V4),
)->save;
if ($params{mtime}) {
utime($params{mtime}, $params{mtime}, $tofile);
}

Auch abrufbar als: Unified diff