OE: single-dbh disconnects
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 8 Sep 2016 14:50:59 +0000 (16:50 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 8 Sep 2016 14:50:59 +0000 (16:50 +0200)
SL/OE.pm

index cc28517..86869f2 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -1257,7 +1257,7 @@ sub order_details {
   my ($self, $myconfig, $form) = @_;
 
   # connect to database
-  my $dbh = $form->get_standard_dbh;
+  my $dbh = SL::DB->client->dbh;
   my $query;
   my @values = ();
   my $sth;
@@ -1605,8 +1605,6 @@ sub order_details {
 
   $form->{username} = $myconfig->{name};
 
-  $dbh->disconnect;
-
   $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef);
   $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id};