[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [583] trunk/LedgerSMB/Form.pm



Revision: 583
          http://svn.sourceforge.net/ledger-smb/?rev=583&view=rev
Author:   einhverfr
Date:     2006-11-13 21:53:11 -0800 (Mon, 13 Nov 2006)

Log Message:
-----------
Fixing many accidental disconnects.

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2006-11-14 05:24:26 UTC (rev 582)
+++ trunk/LedgerSMB/Form.pm	2006-11-14 05:53:11 UTC (rev 583)
@@ -1809,8 +1809,6 @@
 
 	my ($self, $myconfig, $dbh2, $transdate) = @_;
 
-	my $disconnect = ($dbh) ? 0 : 1;
-
 	my $dbh = $self->{dbh};
 
 	my $sth;
@@ -2701,10 +2699,7 @@
 		}
 	}
 
-	if ($disconnect) {
-		$dbh->commit;
-		$dbh->disconnect;
-	}
+	$dbh->commit;
 }
 
 
@@ -3012,8 +3007,7 @@
 	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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.