From 230a7149c35a3b68e14a261ef5238a7c8d1cc2e8 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 2 Mar 2007 20:08:31 +0000 Subject: Fixing db creation to use tcp/ip sockets git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@840 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/CreditCard/TrustCommerce.pm | 2 +- LedgerSMB/User.pm | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/LedgerSMB/CreditCard/TrustCommerce.pm b/LedgerSMB/CreditCard/TrustCommerce.pm index e0adb395..7b75530d 100644 --- a/LedgerSMB/CreditCard/TrustCommerce.pm +++ b/LedgerSMB/CreditCard/TrustCommerce.pm @@ -15,7 +15,7 @@ # # Simple TrustCommerce API using Net::TCLink -package TrustCommerce; +package LedgerSMB::CreditCard::TrustCommerce; use LedgerSMB::CreditCard::Config; use LedgerSMB::CreditCard::TrustCommerce::Config; use Net::TCLink; diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index 6e4a872e..311c412c 100755 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -368,7 +368,10 @@ sub dbcreate { } #Reassign for the work below + &dbconnect_vars($form, $form->{db}); + + $form->debug; my $dbh = DBI->connect( $form->{dbconnect}, @@ -433,6 +436,8 @@ sub process_query { $ENV{PGPASSWORD} = $form->{dbpasswd}; $ENV{PGUSER} = $form->{dbuser}; $ENV{PGDATABASE} = $form->{db}; + $ENV{PGHOST} = $form->{dbhost}; + $ENV{PGPORT} = $form->{dbport}; $results = `psql -f $filename 2>&1`; if ($?){ -- cgit v1.2.3