From cb347e6ae7d6e1d67b25bafec66eb78c5fa232b1 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 17 Jun 2013 17:17:36 +0200 Subject: [PATCH] Alle Anfragen auf admin.pl auf neuen Admin-Controller umleiten --- SL/Dispatcher.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 8329c5b75..1d8b6e5d5 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -223,7 +223,7 @@ sub handle_request { $::form->{action} =~ s/( |-|,|\#)/_/g; ($script, $path, $suffix) = fileparse($script_name, ".pl"); - require_main_code($script, $suffix); + require_main_code($script, $suffix) unless $script eq 'admin'; $::form->{script} = $script . $suffix; @@ -248,11 +248,8 @@ sub handle_request { _require_controller('LoginScreen'); } - if (($script eq 'login') && !$action) { - print $::request->{cgi}->redirect('controller.pl?action=LoginScreen/user_login'); - - } elsif ($script eq 'admin') { - ::run($session_result); + if ((($script eq 'login') && !$action) || ($script eq 'admin')) { + $self->redirect_to_login($script); } else { $self->redirect_to_login($script) if SL::Auth::SESSION_EXPIRED == $session_result; -- 2.20.1