From: Sven Schöling Date: Wed, 21 Jul 2010 12:46:04 +0000 (+0200) Subject: AM->retrieve_units bruacht keine eigene Datenbankverbindung X-Git-Tag: release-2.6.2beta1~234 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6aa467fa48399a1db8b902d8e80787e5d897e27f;p=kivitendo-erp.git AM->retrieve_units bruacht keine eigene Datenbankverbindung --- diff --git a/SL/AM.pm b/SL/AM.pm index 9d8d4671f..f5736f14b 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -1742,7 +1742,7 @@ sub retrieve_units { my ($self, $myconfig, $form, $prefix) = @_; - my $dbh = $form->dbconnect($myconfig); + my $dbh = $form->get_standard_dbh; my $query = "SELECT *, base_unit AS original_base_unit FROM units"; @@ -1782,9 +1782,7 @@ sub retrieve_units { map({ $unit->{"LANGUAGES"}->{$ref->{"template_code"}}->{$_} = $ref->{$_} } keys(%{$ref})); } } - $sth->finish(); - - $dbh->disconnect(); + $sth->finish; $main::lxdebug->leave_sub();