X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher.pm;h=8bd296804c3ea087e6d47728034c0e9593448fd2;hb=85ffde7a577589762b70de99ca08b6f25e9e9d1b;hp=8c450ad771363ef0792d969aed1fb1a96341877b;hpb=3ff4ec3b71a043e3802ef21838a0cee6d8535e4e;p=kivitendo-erp.git diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 8c450ad77..8bd296804 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -82,6 +82,10 @@ sub pre_startup_setup { %::myconfig = (); %::called_subs = (); # currently used for recursion detection } + + $SIG{__WARN__} = sub { + $::lxdebug->warn(@_); + } } sub pre_startup_checks { @@ -94,6 +98,7 @@ sub pre_startup { } sub require_main_code { + $::lxdebug->enter_sub; my ($script, $suffix) = @_; eval { @@ -115,6 +120,7 @@ sub require_main_code { }; $::form->error($EVAL_ERROR) if ($EVAL_ERROR); } + $::lxdebug->leave_sub; } sub handle_request { @@ -124,13 +130,9 @@ sub handle_request { my $interface = lc(shift || 'cgi'); my ($script_name, $action); - if ($interface =~ m/^(?:fastcgi|fcgid|fcgi)$/) { - $script_name = $ENV{SCRIPT_NAME}; - unrequire_bin_mozilla(); + $script_name = $ENV{SCRIPT_NAME}; - } else { - $script_name = $0; - } + unrequire_bin_mozilla($interface); $::cgi = CGI->new(''); $::locale = Locale->new($::language); @@ -199,6 +201,8 @@ sub handle_request { } sub unrequire_bin_mozilla { + return unless $_[0] =~ m/^(?:fastcgi|fcgid|fcgi)$/; + for (keys %INC) { next unless m#^bin/mozilla/#; next if /\bcommon.pl$/;