From f90fcfb985a9c98d8e00717929717012e431f8c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 20 May 2011 13:04:36 +0200 Subject: [PATCH] assert kosmetik. --- SL/Auth.pm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/SL/Auth.pm b/SL/Auth.pm index 6fb66c482..109b75ce3 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -1092,25 +1092,20 @@ sub check_right { } sub assert { - $main::lxdebug->enter_sub(2); - - my $self = shift; - my $right = shift; - my $dont_abort = shift; - - my $form = $main::form; + $::lxdebug->enter_sub(2); + my ($self, $right, $dont_abort) = @_; - if ($self->check_right($form->{login}, $right)) { - $main::lxdebug->leave_sub(2); + if ($self->check_right($::form->{login}, $right)) { + $::lxdebug->leave_sub(2); return 1; } if (!$dont_abort) { - delete $form->{title}; - $form->show_generic_error($main::locale->text("You do not have the permissions to access this function.")); + delete $::form->{title}; + $::form->show_generic_error($::locale->text("You do not have the permissions to access this function.")); } - $main::lxdebug->leave_sub(2); + $::lxdebug->leave_sub(2); return 0; } -- 2.20.1