X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDispatcher.pm;h=d01a0d03baaf241bd5ddb67cf15f370de3e4d5c7;hb=5b5dbec0272c91697acf33c4842ee9d63f041f22;hp=2386d3733035c2ef67668fc4bcbd07b0496490d3;hpb=c6a27f90a8e644ed00910aeddaff38c74b513032;p=kivitendo-erp.git diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 2386d3733..d01a0d03b 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -33,9 +33,9 @@ use SL::Locale; use SL::Common; use SL::Form; use SL::Helper::DateTime; -use SL::Controller::LoginScreen; 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. @@ -82,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; @@ -182,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; @@ -226,7 +229,10 @@ 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'); + ::end_of_request(); + } my %auth_result = $self->{auth_handler}->handle( routing_type => $routing_type, @@ -235,6 +241,8 @@ sub handle_request { action => $action, ); + ::end_of_request() unless $auth_result{auth_ok}; + delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars}; if ($action) { @@ -264,6 +272,8 @@ sub handle_request { } }; + $::form->footer; + # cleanup $::auth->save_session; $::auth->expire_sessions;