summaryrefslogtreecommitdiff
path: root/LedgerSMB.pm
diff options
context:
space:
mode:
authoraurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46>2007-10-03 01:32:37 +0000
committeraurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46>2007-10-03 01:32:37 +0000
commit84b3533f6d54cf37e1bf6b616da4d02523a45fb3 (patch)
treeb4a0056704aa815d66214fe4db28477bc6af3408 /LedgerSMB.pm
parent46cd8dc840a5796513b208c251139b500d4dca7e (diff)
Disabled login checking in LedgerSMB.pm, temporarily.
Whitespace cleanup in DB.pm Modifications to remove user_conf from User.pm git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1692 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB.pm')
-rwxr-xr-xLedgerSMB.pm89
1 files changed, 44 insertions, 45 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm
index 3d5454a5..6c08715d 100755
--- a/LedgerSMB.pm
+++ b/LedgerSMB.pm
@@ -178,50 +178,49 @@ sub new {
}
$self->{_locale} = $locale;
- $self->{stylesheet} = $self->{_user}->{stylesheet};
- if ( $self->{password} ) {
- if (
- !Session::password_check(
- $self, $self->{login}, $self->{password}
- )
- )
- {
- if ($self->is_run_mode('cgi', 'mod_perl')) {
- $self->_get_password();
- }
- else {
- $self->error( __FILE__ . ':' . __LINE__ . ': '
- . $locale->text('Access Denied!') );
- }
- exit;
- }
- else {
- Session::session_create($self);
- }
-
- }
- else {
- if ($self->is_run_mode('cgi', 'mod_perl')) {
- my %cookie;
- $ENV{HTTP_COOKIE} =~ s/;\s*/;/g;
- my @cookies = split /;/, $ENV{HTTP_COOKIE};
- foreach (@cookies) {
- my ( $name, $value ) = split /=/, $_, 2;
- $cookie{$name} = $value;
- }
+# if ( $self->{password} ) {
+# if (
+# !Session::password_check(
+# $self, $self->{ login }, $self->{ password }
+# )
+# )
+# {
+# if ($self->is_run_mode('cgi', 'mod_perl')) {
+# $self->_get_password();
+# }
+# else {
+# $self->error( __FILE__ . ':' . __LINE__ . ': '
+# . $locale->text('Access Denied!') );
+# }
+# exit;
+# }
+# else {
+# Session::session_create($self);
+# }
+
+# }
+# else {
+# if ($self->is_run_mode('cgi', 'mod_perl')) {
+# my %cookie;
+# $ENV{HTTP_COOKIE} =~ s/;\s*/;/g;
+# my @cookies = split /;/, $ENV{HTTP_COOKIE};
+# foreach (@cookies) {
+# my ( $name, $value ) = split /=/, $_, 2;
+# $cookie{$name} = $value;
+# }
#check for valid session
- if ( !Session::session_check( $cookie{"LedgerSMB"}, $self) ) {
- $self->_get_password(1);
- exit;
- }
- }
- else {
- exit;
- }
- }
-
- $self->{stylesheet} = $self->{_user}->{stylesheet};
+# if ( !Session::session_check( $cookie{"LedgerSMB"}, $self) ) {
+# $self->_get_password(1);
+# exit;
+# }
+# }
+# else {
+# exit;
+# }
+# }
+
+# $self->{stylesheet} = $self->{_user}->{stylesheet};
$self->_db_init;
@@ -668,8 +667,8 @@ sub _db_init {
my $myconfig = $self->{_user};
my $dbh = DBI->connect(
- $myconfig->{dbconnect}, $myconfig->{dbuser},
- $myconfig->{dbpasswd}, { AutoCommit => 0 }
+ $myconfig->{ dbconnect }, $myconfig->{ username },
+ $self->{ password }, { AutoCommit => 0 }
) or $self->dberror;
$dbh->{pg_server_prepare} = 0;
@@ -750,7 +749,7 @@ sub type {
my $self = shift @_;
if (!$ENV{REQUEST_METHOD} or
- ( $ENV{REQUEST_METHOD} ne ("HEAD" or "GET" or "POST") ) ) {
+ ( !grep {$ENV{REQUEST_METHOD} eq $_} ("HEAD", "GET", "POST") ) ) {
$self->error("Request method unset or set to unknown value");
}