diff options
author | linuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-03-20 03:27:56 +0000 |
---|---|---|
committer | linuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-03-20 03:27:56 +0000 |
commit | 71601d9c13343fe8451fee657de4c814fbfd108c (patch) | |
tree | 0b7e30d8aafdefc3e1d82ed67dd7de447a4f2905 /LedgerSMB | |
parent | d679e9082662c9d5991eda0e8db0de46a4539cdc (diff) |
backport 1.3 sysconfig changes
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@953 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/Sysconfig.pm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm index 7bcff26d..ef91c45d 100644 --- a/LedgerSMB/Sysconfig.pm +++ b/LedgerSMB/Sysconfig.pm @@ -78,8 +78,6 @@ $ENV{PERL5LIB} .= ":".(join ':', @{$config{environment}{PERL5LIB}}) if %printer = %{$config{printers}} if $config{printers}; -$memberfile = $config{paths}{memberfile} if $config{paths}{memberfile}; -$userspath = $config{paths}{userspath} if $config{paths}{userspath}; $localepath = $config{paths}{localepath} if $config{paths}{localepath}; $spool = $config{paths}{spool} if $config{paths}{spool}; $templates = $config{paths}{templates} if $config{paths}{templates}; @@ -90,19 +88,25 @@ $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}){ + my $dbconnect = "dbi:Pg:dbname=$globalDBname host=$globalDBhost + port=$globalDBport user=$globalDBUserName + password=$globalDBPassword"; # for easier debugging + $GLOBALDBH = DBI->connect($dbconnect); 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 |