Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0b39fe88

Von Tamino Steinert vor 4 Monaten hinzugefügt

  • ID 0b39fe88e13996bdae9860a32372a02dc22fabdd
  • Vorgänger 9478dada
  • Nachfolger 59815a74

S:F:B:Webdav: Lege beim Speichern Dateiversion an

Unterschiede anzeigen:

SL/File/Backend/Webdav.pm
4 4

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

  
8 9
use SL::System::Process;
9 10
use File::Copy;
......
12 13
use File::Path qw(make_path);
13 14
use File::MimeInfo::Magic;
14 15
use File::stat;
16
use UUID::Tiny ':std';
15 17

  
16 18
#
17 19
# public methods
......
59 61
    print OUT $params{file_contents};
60 62
    close(OUT);
61 63
  }
64

  
65
  # save file version
66
  my $doc_path = $self->get_rootdir();
67
  my $rel_file = $tofile;
68
  $rel_file    =~ s/$doc_path//;
69
  my $fv = SL::DB::FileVersion->new(
70
    file_id       => $params{dbfile}->id,
71
    version       => 1, # Webdav doesn't have versions by now.
72
    file_location => $rel_file,
73
    doc_path      => $doc_path,
74
    backend       => 'Webdav',
75
    guid          => create_uuid_as_string(UUID_V4),
76
  )->save;
77

  
62 78
  return 1;
63 79
}
64 80

  

Auch abrufbar als: Unified diff