Revision c815c723
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/IC.pm | ||
---|---|---|
224 | 224 |
} |
225 | 225 |
|
226 | 226 |
sub save { |
227 |
my ($self, $myconfig, $form) = @_; |
|
227 | 228 |
$main::lxdebug->enter_sub(); |
228 | 229 |
|
230 |
my $rc = SL::DB->client->with_transaction(\&_save, $self, $myconfig, $form); |
|
231 |
|
|
232 |
$main::lxdebug->leave_sub(); |
|
233 |
return $rc; |
|
234 |
} |
|
235 |
|
|
236 |
sub _save { |
|
229 | 237 |
my ($self, $myconfig, $form) = @_; |
230 | 238 |
my @values; |
231 | 239 |
# connect to database, turn off AutoCommit |
232 |
my $dbh = $form->get_standard_dbh;
|
|
240 |
my $dbh = SL::DB->client->dbh;
|
|
233 | 241 |
my $restricter = SL::HTML::Restrict->create; |
234 | 242 |
|
235 | 243 |
# save the part |
... | ... | |
535 | 543 |
SQL |
536 | 544 |
do_query($form, $dbh, $query, ($form->{id}) x 2); |
537 | 545 |
|
538 |
# commit |
|
539 |
my $rc = $dbh->commit; |
|
540 |
|
|
541 |
$main::lxdebug->leave_sub(); |
|
542 |
|
|
543 |
return $rc; |
|
546 |
return 1; |
|
544 | 547 |
} |
545 | 548 |
|
546 | 549 |
sub retrieve_assemblies { |
Auch abrufbar als: Unified diff
IC: Umstellung IC::save auf single dbh