From: Moritz Bunkus Date: Fri, 3 Dec 2010 11:01:37 +0000 (+0100) Subject: Session trotzdem refreshen, auch wenn "action" nicht definiert ist X-Git-Tag: release-2.6.2beta1~73^2~6 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=aa2bdd2360d33cbd463e914d452f7011eb8d3894;p=kivitendo-erp.git Session trotzdem refreshen, auch wenn "action" nicht definiert ist --- diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 8bd296804..98c93d4f4 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -155,7 +155,7 @@ sub handle_request { $::form->{titlebar} = "Lx-Office " . $::locale->text('Version') . " $::form->{version}"; ::run($::auth->restore_session); - } elsif ($action) { + } else { # copy from am.pl routines my $session_result = $::auth->restore_session; @@ -172,14 +172,15 @@ sub handle_request { $::auth->create_or_refresh_session; delete $::form->{password}; - map { $::form->{$_} = $::myconfig{$_} } qw(stylesheet charset) - unless $action eq 'save' && $::form->{type} eq 'preferences'; - - $::form->set_standard_title; - ::call_sub('::' . $::locale->findsub($action)); + if ($action) { + map { $::form->{$_} = $::myconfig{$_} } qw(stylesheet charset) + unless $action eq 'save' && $::form->{type} eq 'preferences'; - } else { - $::form->error($::locale->text('action= not defined!')); + $::form->set_standard_title; + ::call_sub('::' . $::locale->findsub($action)); + } else { + $::form->error($::locale->text('action= not defined!')); + } } 1;