summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-14 03:17:02 +0000
committerlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-14 03:17:02 +0000
commit35522ea2952a82660cf67b81f0c81bc054eb59b8 (patch)
treeb86662b7e710aa5e478b4a5ae00d4b52ea71b5da
parent1e60fe4c70cc711135b18dd7875e2130705bd39e (diff)
Modified to use single value pairs for each database parameter.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@893 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--LedgerSMB/Sysconfig.pm12
-rw-r--r--ledger-smb.conf6
2 files changed, 12 insertions, 6 deletions
diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm
index d7d708a4..14bdfa2f 100644
--- a/LedgerSMB/Sysconfig.pm
+++ b/LedgerSMB/Sysconfig.pm
@@ -96,14 +96,18 @@ $sendmail = $config{mail}{sendmail} if $config{mail}{sendmail};
$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");
diff --git a/ledger-smb.conf b/ledger-smb.conf
index 68a75d33..6427cce6 100644
--- a/ledger-smb.conf
+++ b/ledger-smb.conf
@@ -13,6 +13,8 @@ PATH: /usr/local/pgsql/bin
#
[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: