From 99ae850764606d3b4e30519b8131b5e074a8fc29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 8 Sep 2016 16:49:03 +0200 Subject: [PATCH] CA: single-dbh disconnects --- SL/CA.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/SL/CA.pm b/SL/CA.pm index 2c4c221e4..d9fa677a6 100644 --- a/SL/CA.pm +++ b/SL/CA.pm @@ -40,6 +40,7 @@ use strict; package CA; use Data::Dumper; use SL::DBUtils; +use SL::DB; sub all_accounts { $main::lxdebug->enter_sub(); @@ -49,7 +50,7 @@ sub all_accounts { my (%amount, $acc_cash_where); # connect to database - my $dbh = $form->dbconnect($myconfig); + my $dbh = SL::DB->client->dbh; # bug 1071 Warum sollte bei Erreichen eines neuen Jahres die Kontenübersicht nur noch die # bereits bebuchten Konten anzeigen? @@ -134,7 +135,6 @@ sub all_accounts { } $sth->finish; - $dbh->disconnect; $main::lxdebug->leave_sub(); } @@ -144,8 +144,7 @@ sub all_transactions { my ($self, $myconfig, $form) = @_; - # connect to database - my $dbh = $form->dbconnect($myconfig); + my $dbh = SL::DB->client->dbh; # get chart_id my $query = qq|SELECT id FROM chart WHERE accno = ?|; @@ -424,7 +423,6 @@ sub all_transactions { } $sth->finish; - $dbh->disconnect; $main::lxdebug->leave_sub(); } -- 2.20.1