X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher.pm;h=43bf6680b98c38dd1f50b9dd5672efb4fe5b4362;hb=a1a9bb961ab49ee053cb208ea01e17430d0ca836;hp=9083b8df67f6ba047ed782d27411c3920424086e;hpb=469ca9fc3cac624073270fc3217766dbb7aba253;p=kivitendo-erp.git diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 9083b8df6..43bf6680b 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -2,9 +2,18 @@ package SL::Dispatcher; use strict; +# Force scripts/locales.pl to parse these templates: +# parse_html_template('login_screen/auth_db_unreachable') +# parse_html_template('login_screen/user_login') +# parse_html_template('generic/error') + BEGIN { - unshift @INC, "modules/override"; # Use our own versions of various modules (e.g. YAML). - push @INC, "modules/fallback"; # Only use our own versions of modules if there's no system version. + 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 CGI qw( -no_xhtml); @@ -249,6 +258,7 @@ sub handle_request { if ($EVAL_ERROR ne END_OF_REQUEST) { print STDERR $EVAL_ERROR; $::form->{label_error} = $::request->{cgi}->pre($EVAL_ERROR); + chdir SL::System::Process::exe_dir; eval { show_error('generic/error') }; } };