X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDispatcher.pm;h=76fcf6fb7b23f67b5dc6da8966f6f8a466323418;hb=7b9d1666e389bfedba43b2d0fd5d1b0e3f129e88;hp=e728976936a8d34936c37c32bbdcc2013ebdb737;hpb=06132987e7468eca8ca7dc6dbb55982ee5c14785;p=kivitendo-erp.git diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index e72897693..76fcf6fb7 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -180,15 +180,15 @@ sub handle_request { $::form->{script} = "controller.pl"; } - pre_request_checks(); - eval { + pre_request_checks(); + my $session_result = $::auth->restore_session; $::auth->create_or_refresh_session; $::form->error($::locale->text('System currently down for maintenance!')) if -e ($::lx_office_conf{paths}->{userspath} . "/nologin") && $script ne 'admin'; - if ($script eq 'login' or $script eq 'admin' or $script eq 'kopf') { + if ($script eq 'login' or $script eq 'admin') { $::form->{titlebar} = "Lx-Office " . $::locale->text('Version') . " $::form->{version}"; ::run($session_result); @@ -231,13 +231,14 @@ sub handle_request { }; # cleanup + $::auth->expire_session_keys->save_session; + $::auth->expire_sessions; + $::auth->reset; + $::locale = undef; $::form = undef; $::myconfig = (); Form::disconnect_standard_dbh; - $::auth->expire_session_keys->save_session; - $::auth->expire_sessions; - $::auth->reset; $::lxdebug->end_request; $::lxdebug->leave_sub;