my $rc = SL::DB->client->with_transaction(\&_delete, $self, %params);
if (!$rc) {
my $err = SL::DB->client->error;
- die (ref $err?$$err:$err);
+ die $err?(ref $err?$$err:$err):"unknown err";
}
return $rc;
}
sub save {
my ($self, %params) = @_;
die 'dbfile not exists' unless $params{dbfile};
- $main::lxdebug->message(LXDebug->DEBUG2(), "in backend " . $self . " file " . $params{dbfile});
- $main::lxdebug->message(LXDebug->DEBUG2(), "file id=" . $params{dbfile}->id . " path=" . $params{file_path});
my $dbfile = $params{dbfile};
die 'no file contents' unless $params{file_path} || $params{file_contents};
$dbfile->backend_data(0) unless $dbfile->backend_data;
$dbfile->save->load;
my $tofile = $self->_filesystem_path($dbfile);
- $main::lxdebug->message(LXDebug->DEBUG2(), "topath=" . $tofile . " from=" . $params{file_path});
if ($params{file_path} && -f $params{file_path}) {
File::Copy::copy($params{file_path}, $tofile);
}
my ($self, %params) = @_;
die "no dbfile" unless $params{dbfile};
$main::lxdebug->message(LXDebug->DEBUG2(), "version=" .$params{version});
- die "unknown version" if $params{version} &&
+ die "unknown version" if $params{version} &&
($params{version} < 0 || $params{version} > $params{dbfile}->backend_data) ;
my $path = $self->_filesystem_path($params{dbfile},$params{version});
die "no file found in backend" if !-f $path;
Martin Helmling E<lt>martin.helmling@opendynamic.deE<gt>
=cut
-
-