X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher.pm;h=6b7cf630097091bd4dd34fb24586b45e2244f57b;hb=74d8dd6f77ff33f496cac0fc1c715c167232a5ca;hp=7126513eb83f2f2323f81b2b15c83191904f4879;hpb=bcc99615a523f4c1816a71c823c39dc7a9f198ba;p=kivitendo-erp.git diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 7126513eb..6b7cf6300 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -7,15 +7,6 @@ use strict; # 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; - - unshift @INC, "${exe_dir}/modules/override"; # Use our own versions of various modules (e.g. YAML). - push @INC, "${exe_dir}/modules/fallback"; # Only use our own versions of modules if there's no system version. - unshift @INC, $exe_dir; -} - use Carp; use CGI qw( -no_xhtml); use Config::Std; @@ -143,7 +134,7 @@ sub show_error { print $::form->parse_html_template($template, \%params); $::lxdebug->leave_sub; - ::end_of_request(); + end_request(); } sub pre_startup_setup { @@ -305,7 +296,7 @@ sub handle_request { action => $action, ); - ::end_of_request() unless $auth_result{auth_ok}; + $self->end_request unless $auth_result{auth_ok}; delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars}; @@ -353,11 +344,10 @@ sub handle_request { $::locale = undef; $::form = undef; - $::myconfig = (); + %::myconfig = (); $::request = undef; SL::DBConnect::Cache->reset_all; - Form::disconnect_standard_dbh; $self->_watch_for_changed_files; @@ -370,7 +360,7 @@ sub redirect_to_login { $action .= '&error=' . $params{error} if $params{error}; print $::request->cgi->redirect("controller.pl?action=${action}"); - ::end_of_request(); + $self->end_request; } sub unrequire_bin_mozilla { @@ -498,7 +488,7 @@ sub _check_for_old_config_files { $::form->header; print $::form->parse_html_template('login_screen/old_configuration_files', { FILES => \@old_files }); - ::end_of_request(); + end_request(); } sub _parse_number_with_unit { @@ -549,11 +539,7 @@ sub _memory_usage_is_too_high { return 0; } -package main; - -use strict; - -sub end_of_request { +sub end_request { die SL::Dispatcher->END_OF_REQUEST; }