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

SF.net SVN: ledger-smb: [893] trunk



Revision: 893
          http://svn.sourceforge.net/ledger-smb/?rev=893&view=rev
Author:   linuxpoet
Date:     2007-03-13 20:17:02 -0700 (Tue, 13 Mar 2007)

Log Message:
-----------
Modified to use single value pairs for each database parameter.

Modified Paths:
--------------
    trunk/LedgerSMB/Sysconfig.pm
    trunk/ledger-smb.conf

Modified: trunk/LedgerSMB/Sysconfig.pm
===================================================================
--- trunk/LedgerSMB/Sysconfig.pm	2007-03-14 02:56:06 UTC (rev 892)
+++ trunk/LedgerSMB/Sysconfig.pm	2007-03-14 03:17:02 UTC (rev 893)
@@ -96,14 +96,18 @@
 $smtphost = $config{mail}{smtphost} if $config{mail}{smtphost};
 $smtptimeout = $config{mail}{smtptimeout} if $config{mail}{smtptimeout};
 
-$globalDBConnect = $config{globaldb}{DBConnect} if $config{globaldb}{DBConnect};
+# We used to have a global dbconnect but have moved to single entries
+$globalDBhost = $config{globaldb}{DBhost} if $config{globaldb}{DBhost};
+$globalDBport = $config{globaldb}{DBport} if $config{globaldb}{DBport};
+$globalDBname = $config{globaldb}{DBname} if $config{globaldb}{DBname};
 $globalDBUserName = $config{globaldb}{DBUserName} if $config{globaldb}{DBUserName};
 $globalDBPassword = $config{globaldb}{DBPassword} if $config{globaldb}{DBPassword};
 
 #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);
+if ($config{globaldb}{DBname}){
+	$GLOBALDBH = DBI->connect("dbi:Pg:dbname=$globalDBname host=$globalDBhost
+	                                 port=$globalDBport user=$globalDBUserName
+	                                 password=$globalDBPassword");
 	if (!$GLOBALDBH){
 		$form = new Form;
 		$form->error("No GlobalDBH Configured or Could not Connect");

Modified: trunk/ledger-smb.conf
===================================================================
--- trunk/ledger-smb.conf	2007-03-14 02:56:06 UTC (rev 892)
+++ trunk/ledger-smb.conf	2007-03-14 03:17:02 UTC (rev 893)
@@ -13,6 +13,8 @@
 #
 [globaldb]
 ##uncomment below and set to correct values
-DBConnect: dbi:Pg:dbname=lsmb13;host=localhost;port=5432
+DBname: lsmb13
+DBhost: localhost
+DBport: 5432
 DBUserName: postgres
-# DBPassword: password
+DBPassword:


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