Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 19727dec

Von Tamino Steinert vor 9 Monaten hinzugefügt

  • ID 19727dec10b8d73d83d5b9d305c4a161fa9973de
  • Vorgänger 8c92c352
  • Nachfolger 7c7f3f38

File: Löschen über die guid der Version

Unterschiede anzeigen:

SL/File/Object.pm
6 6

  
7 7
use Rose::Object::MakeMethods::Generic (
8 8
  scalar => [ qw() ],
9
  'scalar --get_set_init' => [ qw(db_file loaded id version newest) ],
9
  'scalar --get_set_init' => [ qw(db_file loaded id file_version version newest) ],
10 10
);
11 11

  
12 12
#use SL::DB::Helper::Attr;
......
97 97
  SL::File->delete(dbfile => $_[0]->loaded_db_file, last => 1 )
98 98
}
99 99

  
100
sub delete_version {
101
  SL::File->delete(dbfile => $_[0]->loaded_db_file, version => $_[0]->version )
100
sub delete_file_version {
101
  SL::File->delete(dbfile => $_[0]->loaded_db_file, file_version => $_[0]->file_version )
102 102
}
103 103

  
104 104
sub purge {
......
129 129
}
130 130

  
131 131

  
132
sub init_db_file { die 'must always have a db file'; }
133
sub init_loaded  { 0 }
134
sub init_id      { 0 }
135
sub init_version { 0 }
136
sub init_newest  { 1 }
132
sub init_db_file      { die 'must always have a db file'; }
133
sub init_loaded       { 0 }
134
sub init_id           { 0 }
135
sub init_version      { 0 }
136
sub init_file_version { undef }
137
sub init_newest       { 1 }
137 138

  
138 139
1;
139 140

  
......
218 219

  
219 220
=back
220 221

  
221
Additional are there special methods. If the Object is created by SL::File::get_all_versions()
222
or by "$object->versions"
223
it has a version number. So the different mtime, filepath or content can be retrieved:
222
Additional are there special methods. If the Object is created by
223
C<SL::File::get_all_versions()> or by C<$object->versions>. It has a version
224
number in C<version> and a version object in C<file_version> of type
225
C<SL::DB::FileVersion>. So the different mtime, filepath or content can be
226
retrieved:
224 227

  
225 228
=over 4
226 229

  

Auch abrufbar als: Unified diff