X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher.pm;h=35a351877f8f6ef84ac26f530141259780d4a3a0;hb=81fed28305f28aff317639f9a190cdf83a678ed4;hp=c6f3b5e10d186b4580079f817d726d7319084313;hpb=e7d52be303c9251fa2a46dee0d9a6c45fb0e2d54;p=kivitendo-erp.git diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index c6f3b5e10..35a351877 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -2,6 +2,11 @@ package SL::Dispatcher; use strict; +# Force scripts/locales.pl to parse these templates: +# parse_html_template('login_screen/auth_db_unreachable') +# parse_html_template('login_screen/user_login') +# parse_html_template('generic/error') + BEGIN { use SL::System::Process; my $exe_dir = SL::System::Process::exe_dir; @@ -30,6 +35,7 @@ use SL::Form; use SL::Helper::DateTime; use SL::InstanceConfiguration; use SL::Template::Plugin::HTMLFixes; +use SL::Layout::None; # Trailing new line is added so that Perl will not add the line # number 'die' was called in. @@ -76,7 +82,7 @@ sub show_error { $::form->{error} = $::locale->text('The session is invalid or has expired.') if ($error_type eq 'session'); $::form->{error} = $::locale->text('Incorrect password!') if ($error_type eq 'password'); - $::form->header; + $::form->header(no_menu => 1); print $::form->parse_html_template($template, \%params); $::lxdebug->leave_sub; @@ -176,7 +182,10 @@ sub handle_request { $::locale = Locale->new($::lx_office_conf{system}->{language}); $::form = Form->new; $::instance_conf = SL::InstanceConfiguration->new; - $::request = { cgi => CGI->new({}) }; + $::request = { + cgi => CGI->new({}), + layout => SL::Layout::None->new, + }; my $session_result = $::auth->restore_session; $::auth->create_or_refresh_session; @@ -220,7 +229,9 @@ sub handle_request { ::run($session_result); } else { - show_error('login_screen/user_login', 'session') if SL::Auth::SESSION_EXPIRED == $session_result; + if (SL::Auth::SESSION_EXPIRED == $session_result) { + print $::request->{cgi}->redirect('controller.pl?action=LoginScreen/user_login&error=session'); + } my %auth_result = $self->{auth_handler}->handle( routing_type => $routing_type, @@ -258,6 +269,8 @@ sub handle_request { } }; + $::form->footer; + # cleanup $::auth->save_session; $::auth->expire_sessions;