From: Sven Schöling Date: Fri, 13 Sep 2013 11:59:44 +0000 (+0200) Subject: GetModels: current_action Hook ersetzt durch action_name X-Git-Tag: release-3.1.0beta1~54 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=aa18b62a0d5ae5640e9061c44e10c19cfb3dbf9f;p=kivitendo-erp.git GetModels: current_action Hook ersetzt durch action_name --- 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); }