diff options
author | christopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-31 19:27:18 +0000 |
---|---|---|
committer | christopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-31 19:27:18 +0000 |
commit | 6a7e49e39b53202fd6e848e6590372645285d8ac (patch) | |
tree | ddecf8bc90dee95d241fed83cea9edb453889251 /LedgerSMB | |
parent | f91dc64e5e02a2bdc66b166250248087627531cc (diff) |
putting global db parameters into ledger-smb.conf file, updating LedgerSMB::Sysconfig. Lines are commented out so to not break current testing and development
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@426 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/Sysconfig.pm | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm index a8b2e827..962c16fc 100644 --- a/LedgerSMB/Sysconfig.pm +++ b/LedgerSMB/Sysconfig.pm @@ -5,6 +5,8 @@ package LedgerSMB::Sysconfig; use Config::Std; +use DBI qw(:sql_types); + $session='DB'; $logging=0; # No logging on by default @@ -46,15 +48,6 @@ $localepath = 'locale/po'; Epson => 'lpr -PEpson', ); -################################# -# Global database parameters -################################# -# These parameters *must* be set correctly -# for LedgerSMB >= 1.2 to work -my $globalDBConnect = 'dbi:Pg:dbname=ledgersmb;host=localhost;port=5432'; -my $globalUserName = "ledgersmb"; -my $globalPassword = "set me to correct password"; - my %config; read_config('ledger-smb.conf' => %config) or die; @@ -82,11 +75,13 @@ $sendmail = $config{programs}{sendmail} if $config{programs}{sendmail}; $gzip = $config{programs}{gzip} if $config{programs}{gzip}; $globalDBConnect = $config{globaldb}{DBConnect} if $config{globaldb}{DBConnect}; -$globalUserName = $config{globaldb}{UserName} if $config{globaldb}{UserName}; -$globalPassword = $config{globaldb}{Password} if $config{globaldb}{Password}; - -#$GLOBALDBH = DBI->connect($globalDBConnect, $globalDBUserName, $globalDBPassword); +$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) or die; +} # These lines prevent other apps in mod_perl from seeing the global db # connection info |