From aa2bdd2360d33cbd463e914d452f7011eb8d3894 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 3 Dec 2010 12:01:37 +0100 Subject: [PATCH] Session trotzdem refreshen, auch wenn "action" nicht definiert ist --- SL/Dispatcher.pm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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; -- 2.20.1