summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB')
-rw-r--r--LedgerSMB/Form.pm6
-rwxr-xr-xLedgerSMB/Session/DB.pm4
2 files changed, 7 insertions, 3 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index c06c9391..02bd44aa 100644
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -1139,8 +1139,12 @@ sub db_init {
$self->{company} = $LedgerSMB::Sysconfig::default_db;
}
my $dbname = $self->{company};
+ my $dbconfig = { dbconnect => "dbi:Pg:dbname=$dbname",
+ dbuser => $login,
+ dbpasswd => $password
+ };
- $self->{dbh} = $self->dbconnect_noauto($myconfig) || $self->dberror();
+ $self->{dbh} = $self->dbconnect_noauto($dbconfig) || $self->dberror();
my $dbh = $self->{dbh};
my %date_query = (
'mm/dd/yy' => 'set DateStyle to \'SQL, US\'',
diff --git a/LedgerSMB/Session/DB.pm b/LedgerSMB/Session/DB.pm
index f7f1e672..06385a8f 100755
--- a/LedgerSMB/Session/DB.pm
+++ b/LedgerSMB/Session/DB.pm
@@ -32,13 +32,13 @@ use MIME::Base64;
use strict;
sub session_check {
-
use Time::HiRes qw(gettimeofday);
+ my ( $cookie, $form ) = @_;
+
my $path = ($ENV{SCRIPT_NAME});
$path =~ s|[^/]*$||;
- my ( $cookie, $form ) = @_;
if ($cookie eq 'Login'){
return session_create($form);
}