X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/9c5108ec2676354b4738e9b3d2c2a5353056a8dd..f36eb9fca78c4940b486b7dafa4ab636cdaf99cd:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index c6e146468..a1e6a4d9d 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2016,7 +2016,7 @@ sub all_departments { sub create_links { $main::lxdebug->enter_sub(); - my ($self, $module, $myconfig, $table) = @_; + my ($self, $module, $myconfig, $table, $provided_dbh) = @_; my ($fld, $arap); if ($table eq "customer") { @@ -2033,7 +2033,7 @@ sub create_links { # get last customers or vendors my ($query, $sth, $ref); - my $dbh = $self->dbconnect($myconfig); + my $dbh = $provided_dbh ? $provided_dbh : $self->dbconnect($myconfig); my %xkeyref = (); if (!$self->{id}) { @@ -2227,7 +2227,7 @@ sub create_links { } - $dbh->disconnect; + $dbh->disconnect() unless $provided_dbh; $main::lxdebug->leave_sub(); }