From: Sven Schöling Date: Thu, 8 Sep 2016 14:49:36 +0000 (+0200) Subject: CT: single-dbh disconnects X-Git-Tag: release-3.5.4~2051 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=582dc2d8f1af7fe53bf1bdc0489de6b2c00f5ae7;p=kivitendo-erp.git CT: single-dbh disconnects --- diff --git a/SL/CT.pm b/SL/CT.pm index d8497d008..e4b1ee0b1 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -40,6 +40,7 @@ package CT; use SL::Common; use SL::CVar; use SL::DBUtils; +use SL::DB; use Text::ParseWords; use strict; @@ -341,7 +342,7 @@ sub get_contact { die 'Missing argument: cp_id' unless $::form->{cp_id}; - my $dbh = $form->dbconnect($myconfig); + my $dbh = SL::DB->client->dbh; my $query = qq|SELECT * FROM contacts c | . qq|WHERE cp_id = ? ORDER BY cp_id limit 1|; @@ -359,7 +360,6 @@ sub get_contact { ($form->{cp_used}) = selectfirst_array_query($form, $dbh, $query, ($form->{cp_id})x2); $sth->finish; - $dbh->disconnect; $main::lxdebug->leave_sub(); }