X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/c301b22ef2104be9a6a80bf327bc7151fb27e898..aa18b62a0d5ae5640e9061c44e10c19cfb3dbf9f:/SL/Controller/Helper/GetModels.pm diff --git a/SL/Controller/Helper/GetModels.pm b/SL/Controller/Helper/GetModels.pm index 8e2ede133..821d7a194 100644 --- a/SL/Controller/Helper/GetModels.pm +++ b/SL/Controller/Helper/GetModels.pm @@ -16,8 +16,6 @@ sub register_get_models_handlers { $only = [ $only ] if !ref $only; my %hook_params = @{ $only } ? ( only => $only ) : (); - $class->run_before(sub { $_[0]->{PRIV()} = { current_action => $_[1] }; }, %hook_params); - my $handlers = _registered_handlers($class); map { push @{ $handlers->{$_} }, $additional_handlers{$_} if $additional_handlers{$_} } keys %$handlers; } @@ -41,7 +39,7 @@ sub get_models_url_params { sub get_callback { my ($self, %override_params) = @_; - my %default_params = _run_handlers($self, 'callback', action => ($self->{PRIV()} || {})->{current_action}); + my %default_params = _run_handlers($self, 'callback', action => $self->action_name); return $self->url_for(%default_params, %override_params); }