From 582dc2d8f1af7fe53bf1bdc0489de6b2c00f5ae7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 8 Sep 2016 16:49:36 +0200 Subject: [PATCH] CT: single-dbh disconnects --- SL/CT.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } -- 2.20.1