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

SF.net SVN: ledger-smb: [571] trunk/LedgerSMB/Sysconfig.pm



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

Log Message:
-----------
Fixed 500 error when trying to connect with bad GlobalDBH settings.

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

Modified: trunk/LedgerSMB/Sysconfig.pm
===================================================================
--- trunk/LedgerSMB/Sysconfig.pm	2006-11-14 01:11:43 UTC (rev 570)
+++ trunk/LedgerSMB/Sysconfig.pm	2006-11-14 03:09:34 UTC (rev 571)
@@ -95,7 +95,12 @@
 
 #putting this in an if clause for now so not to break other devel users
 if ($config{globaldb}{DBConnect}){
-	$GLOBALDBH = DBI->connect($globalDBConnect, $globalDBUserName, $globalDBPassword) or die;
+	$GLOBALDBH = DBI->connect($globalDBConnect, $globalDBUserName, 
+		$globalDBPassword);
+	if (!$GLOBALDBH){
+		$form = new Form;
+		$form->error("No GlobalDBH Configured or Could not Connect");
+	}
 }
 # These lines prevent other apps in mod_perl from seeing the global db 
 # connection info


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