Revision a85404a4
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/Dispatcher.pm | ||
---|---|---|
248 | 248 |
_require_controller('LoginScreen'); |
249 | 249 |
} |
250 | 250 |
|
251 |
if ((($script eq 'login') && !$action) || ($script eq 'admin')) { |
|
251 |
if ( (($script eq 'login') && !$action) |
|
252 |
|| ($script eq 'admin') |
|
253 |
|| (SL::Auth::SESSION_EXPIRED() == $session_result)) { |
|
252 | 254 |
$self->redirect_to_login($script); |
253 | 255 |
|
254 |
} else { |
|
255 |
$self->redirect_to_login($script) if SL::Auth::SESSION_EXPIRED == $session_result; |
|
256 |
} |
|
256 | 257 |
|
257 |
my %auth_result = $self->{auth_handler}->handle(
|
|
258 |
routing_type => $routing_type,
|
|
259 |
script => $script,
|
|
260 |
controller => $script_name,
|
|
261 |
action => $action,
|
|
262 |
);
|
|
258 |
my %auth_result = $self->{auth_handler}->handle( |
|
259 |
routing_type => $routing_type, |
|
260 |
script => $script, |
|
261 |
controller => $script_name, |
|
262 |
action => $action, |
|
263 |
); |
|
263 | 264 |
|
264 |
::end_of_request() unless $auth_result{auth_ok};
|
|
265 |
::end_of_request() unless $auth_result{auth_ok}; |
|
265 | 266 |
|
266 |
delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars};
|
|
267 |
delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars}; |
|
267 | 268 |
|
268 |
if ($action) {
|
|
269 |
$::instance_conf->init if $auth_result{auth_level} eq 'user';
|
|
269 |
if ($action) { |
|
270 |
$::instance_conf->init if $auth_result{auth_level} eq 'user'; |
|
270 | 271 |
|
271 |
map { $::form->{$_} = $::myconfig{$_} } qw(charset)
|
|
272 |
unless $action eq 'save' && $::form->{type} eq 'preferences';
|
|
272 |
map { $::form->{$_} = $::myconfig{$_} } qw(charset) |
|
273 |
unless $action eq 'save' && $::form->{type} eq 'preferences'; |
|
273 | 274 |
|
274 |
$::form->set_standard_title; |
|
275 |
if ($routing_type eq 'old') { |
|
276 |
::call_sub('::' . $::locale->findsub($action)); |
|
277 |
} else { |
|
278 |
_run_controller($script_name, $action); |
|
279 |
} |
|
275 |
$::form->set_standard_title; |
|
276 |
if ($routing_type eq 'old') { |
|
277 |
::call_sub('::' . $::locale->findsub($action)); |
|
280 | 278 |
} else { |
281 |
$::form->error($::locale->text('action= not defined!'));
|
|
279 |
_run_controller($script_name, $action);
|
|
282 | 280 |
} |
281 |
} else { |
|
282 |
$::form->error($::locale->text('action= not defined!')); |
|
283 | 283 |
} |
284 | 284 |
|
285 | 285 |
1; |
Auch abrufbar als: Unified diff
Codevereinfachung: Shortcut & dadurch weniger Einrückung