Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 24d1656e

Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt

  • ID 24d1656ebd75cc1125b15b1c9727cae0fb4417d1
  • Vorgänger f3324b5a
  • Nachfolger 1b032ef4

SL::File: get auch mit dbfile als Parameter aufrufen können

Unterschiede anzeigen:

SL/File.pm
sub get {
my ($self, %params) = @_;
die 'no id' unless $params{id};
my $dbfile = SL::DB::Manager::File->get_first(query => [id => $params{id}]);
die 'not found' unless $dbfile;
$main::lxdebug->message(LXDebug->DEBUG2(), "object_id=".$dbfile->object_id." object_type=".$dbfile->object_type." dbfile=".$dbfile);
SL::File::Object->new(db_file => $dbfile, id => $dbfile->id, loaded => 1);
die "no id or dbfile" unless $params{id} || $params{dbfile};
$params{dbfile} = SL::DB::Manager::File->get_first(query => [id => $params{id}]) if !$params{dbfile};
die 'not found' unless $params{dbfile};
$main::lxdebug->message(LXDebug->DEBUG2(), "object_id=".$params{dbfile}->object_id." object_type=".$params{dbfile}->object_type." dbfile=".$params{dbfile});
SL::File::Object->new(db_file => $params{dbfile}, id => $params{dbfile}->id, loaded => 1);
}
sub get_version_count {

Auch abrufbar als: Unified diff