From 7309cf796a50c8bc0b9ad5e5896863ed822aa20a Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 14 Nov 2006 05:53:11 +0000 Subject: Fixing many accidental disconnects. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@583 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 1985842d..7125ce7e 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -1809,8 +1809,6 @@ sub all_taxaccounts { my ($self, $myconfig, $dbh2, $transdate) = @_; - my $disconnect = ($dbh) ? 0 : 1; - my $dbh = $self->{dbh}; my $sth; @@ -2701,10 +2699,7 @@ sub save_recurring { } } - if ($disconnect) { - $dbh->commit; - $dbh->disconnect; - } + $dbh->commit; } @@ -3012,8 +3007,7 @@ sub audittrail { my $disconnect; if (! $dbh) { - $dbh = $self->dbconnect($myconfig); - $disconnect = 1; + $dbh = $self->{dbh}; } # if we have an id add audittrail, otherwise get a new timestamp -- cgit v1.2.3