X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher.pm;h=f9ad09a874bac259cb63707dbe7048ed80783f84;hb=e8ac38a63f43c43b30cdf45bd877e39bf0fd41b1;hp=1292f280c204978ea02cca20b0cf60ff77c13f27;hpb=32f6b40f49f084318d614f868407c83c36f35e00;p=kivitendo-erp.git diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 1292f280c..f9ad09a87 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -26,6 +26,7 @@ use File::Basename; use List::MoreUtils qw(all); use List::Util qw(first); use POSIX; +use SL::ArchiveZipFixes; use SL::Auth; use SL::Dispatcher::AuthHandler; use SL::LXDebug; @@ -51,6 +52,8 @@ sub new { $self->{interface} = lc($interface || 'cgi'); $self->{auth_handler} = SL::Dispatcher::AuthHandler->new; + SL::ArchiveZipFixes->apply_fixes; + return $self; } @@ -267,8 +270,6 @@ sub handle_request { delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars}; if ($action) { - $::instance_conf->init if $auth_result{auth_level} eq 'user'; - $::form->set_standard_title; if ($routing_type eq 'old') { ::call_sub('::' . $::locale->findsub($action)); @@ -352,7 +353,7 @@ sub _route_dispatcher_request { my ($script_name, $action); eval { - die "Unroutable request -- inavlid module name.\n" if !$::form->{M} || ($::form->{M} !~ m/^${name_re}$/); + die "Unroutable request -- invalid module name.\n" if !$::form->{M} || ($::form->{M} !~ m/^${name_re}$/); $script_name = $::form->{M} . '.pl'; if ($::form->{A}) { @@ -360,7 +361,7 @@ sub _route_dispatcher_request { } else { $action = first { m/^A_${name_re}$/ } keys %{ $::form }; - die "Unroutable request -- inavlid action name.\n" if !$action; + die "Unroutable request -- invalid action name.\n" if !$action; delete $::form->{$action}; $action = substr $action, 2; @@ -381,7 +382,7 @@ sub _route_controller_request { my ($controller, $action, $request_type); eval { - $::form->{action} =~ m|^ ( [A-Z] [A-Za-z0-9_]* ) / ( [a-z] [a-z0-9_]* ) ( \. [a-zA-Z]+ )? $|x || die "Unroutable request -- inavlid controller/action.\n"; + $::form->{action} =~ m|^ ( [A-Z] [A-Za-z0-9_]* ) / ( [a-z] [a-z0-9_]* ) ( \. [a-zA-Z]+ )? $|x || die "Unroutable request -- invalid controller/action.\n"; ($controller, $action) = ($1, $2); delete $::form->{action};