X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=login.pl;h=e8a3c5b6271e81c57d7814257296dbe337f61692;hb=0efaacee75b966aa01e8a4e0358b5753a9e52a22;hp=f761de800eac940a1bd393d7d4fcd85e37cc4b3b;hpb=d629acd82a27e980899a044ca8b0f4becc8e94bb;p=kivitendo-erp.git diff --git a/login.pl b/login.pl index f761de800..e8a3c5b62 100755 --- a/login.pl +++ b/login.pl @@ -30,23 +30,27 @@ # ####################################################################### +use strict; + BEGIN { - push(@INC, "modules"); + unshift @INC, "modules/override"; # Use our own versions of various modules (e.g. YAML). + push @INC, "modules/fallback"; # Only use our own versions of modules if there's no system version. } # setup defaults, DO NOT CHANGE -$userspath = "users"; -$templates = "templates"; -$memberfile = "users/members"; -$sendmail = "| /usr/sbin/sendmail -t"; +$main::userspath = "users"; +$main::templates = "templates"; +$main::memberfile = "users/members"; +$main::sendmail = "| /usr/sbin/sendmail -t"; ########## end ########################################### $| = 1; use SL::LXDebug; -$lxdebug = LXDebug->new(); +$main::lxdebug = LXDebug->new(); -eval { require "lx-erp.conf"; }; +eval { require "config/lx-erp.conf"; }; +eval { require "config/lx-erp-local.conf"; } if -f "config/lx-erp-local.conf"; if ($ENV{CONTENT_LENGTH}) { read(STDIN, $_, $ENV{CONTENT_LENGTH}); @@ -60,17 +64,19 @@ if ($ARGV[0]) { $_ = $ARGV[0]; } -%form = split /[&=]/; +my %form = split /[&=]/; # fix for apache 2.0 bug map { $form{$_} =~ s/\\$// } keys %form; # name of this script $0 =~ tr/\\/\//; -$pos = rindex $0, '/'; -$script = substr($0, $pos + 1); +my $pos = rindex $0, '/'; +my $script = substr($0, $pos + 1); + +$form{login} =~ s|.*/||; -if (-e "$userspath/nologin" && $script ne 'admin.pl') { +if (-e "$main::userspath/nologin" && $script ne 'admin.pl') { print "content-type: text/plain Login disabled!\n";