X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher.pm;h=30a4b819ccb2e70c2a008a7fc7ade4d479b5eb7b;hb=e3329d46a4c2ed19172f9c9ed8251af03cbc1905;hp=cfb4fb834f26ac298e4953f906cad9318daa63e6;hpb=772f08d07f41febb13a52e066036d23faa0490fc;p=kivitendo-erp.git diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index cfb4fb834..30a4b819c 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -68,7 +68,6 @@ sub show_error { $::form->{error} = $::locale->text('The session is invalid or has expired.') if ($error_type eq 'session'); $::form->{error} = $::locale->text('Incorrect password!.') if ($error_type eq 'password'); $::myconfig{countrycode} = $::lx_office_conf{system}->{language}; - $::form->{stylesheet} = 'css/lx-office-erp.css'; $::form->header; print $::form->parse_html_template($template); @@ -168,11 +167,10 @@ sub handle_request { $self->unrequire_bin_mozilla; - $::cgi = CGI->new(''); $::locale = Locale->new($::lx_office_conf{system}->{language}); $::form = Form->new; $::instance_conf = SL::InstanceConfiguration->new; - $::request = { }; + $::request = { cgi => CGI->new({}) }; my $session_result = $::auth->restore_session; $::auth->create_or_refresh_session; @@ -206,7 +204,7 @@ sub handle_request { } else { show_error('login/password_error', 'session') if SL::Auth::SESSION_EXPIRED == $session_result; - %::myconfig = $::auth->read_user($::form->{login}); + %::myconfig = $::auth->read_user(login => $::form->{login}); show_error('login/password_error', 'password') unless $::myconfig{login}; @@ -222,7 +220,7 @@ sub handle_request { if ($action) { $::instance_conf->init; - map { $::form->{$_} = $::myconfig{$_} } qw(stylesheet charset) + map { $::form->{$_} = $::myconfig{$_} } qw(charset) unless $action eq 'save' && $::form->{type} eq 'preferences'; $::form->set_standard_title; @@ -240,7 +238,7 @@ sub handle_request { } or do { if ($EVAL_ERROR ne END_OF_REQUEST) { print STDERR $EVAL_ERROR; - $::form->{label_error} = $::cgi->pre($EVAL_ERROR); + $::form->{label_error} = $::request->{cgi}->pre($EVAL_ERROR); eval { show_error('generic/error') }; } }; @@ -311,7 +309,7 @@ sub _route_dispatcher_request { 1; } or do { - $::form->{label_error} = $::cgi->pre($EVAL_ERROR); + $::form->{label_error} = $::request->{cgi}->pre($EVAL_ERROR); show_error('generic/error'); }; @@ -328,7 +326,7 @@ sub _route_controller_request { 1; } or do { - $::form->{label_error} = $::cgi->pre($EVAL_ERROR); + $::form->{label_error} = $::request->{cgi}->pre($EVAL_ERROR); show_error('generic/error'); }; @@ -375,7 +373,6 @@ sub _check_for_old_config_files { return unless @old_files; $::form->{title} = $::locale->text('Old configuration files'); - $::form->{stylesheet} = 'lx-office-erp.css'; $::form->header; print $::form->parse_html_template('login/old_configuration_files', { FILES => \@old_files });