X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=kopf.pl;h=b01c42a10d89623d22c6879202ad67ca1f3da735;hb=969fc342452c5df14e5c50b0df14fb884f83590f;hp=16cd6d95cff94e9e68acc4773a46ce4f21443c45;hpb=ce1ee6bff6eef429d7b4783f4ede84327f985ae4;p=kivitendo-erp.git diff --git a/kopf.pl b/kopf.pl index 16cd6d95c..b01c42a10 100755 --- a/kopf.pl +++ b/kopf.pl @@ -1,18 +1,36 @@ #!/usr/bin/perl # +use strict; + +BEGIN { + 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. +} + use SL::LXDebug; -$lxdebug = LXDebug->new(); +our $lxdebug = LXDebug->new(); +use SL::Auth; use SL::Form; use SL::Locale; -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"); + +our $form = new Form; + +our $auth = SL::Auth->new(); +if (!$auth->session_tables_present()) { + _show_error('login/auth_db_unreachable'); +} +$auth->expire_sessions(); +$auth->restore_session(); -$form = new Form; +our %myconfig = $auth->read_user($form->{login}); -eval { require("$userspath/$form->{login}.conf"); }; +our $locale = new Locale "$myconfig{countrycode}", "kopf"; -$locale = new Locale "$myconfig{countrycode}", "kopf"; +delete $form->{password}; eval { require "bin/mozilla/kopf.pl"; };