Skip to content
Snippets Groups Projects
Commit bb317d27 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

kill useless reference to next_action

parent 42e88f2e
No related branches found
No related tags found
No related merge requests found
......@@ -103,28 +103,21 @@ sub execute {
# Check the requested action
$self->{action} = $parameters{action} || 'home';
do {
## Actions can be chained
$self->{action} = $self->{next_action} if ($self->{next_action});
delete $self->{next_action}; ## Prevent loops
if (defined $self->actions->{ $self->{action} }) {
## Execute the target subroutine named req_actionName
no strict 'refs';
my $sub = 'req_' . $self->{action};
$status = &{$sub}($self);
} else {
## Inknown action
push @{ $self->{param_out}->{errors} }, "unknown_action";
$self->{logger}->log(
level => LOG_ERROR,
message => "Unknown action '%s'",
$self->{action}
);
}
if (defined $self->actions->{ $self->{action} }) {
## Execute the target subroutine named req_actionName
no strict 'refs';
my $sub = 'req_' . $self->{action};
$status = &{$sub}($self);
} else {
## Inknown action
push @{ $self->{param_out}->{errors} }, "unknown_action";
$self->{logger}->log(
level => LOG_ERROR,
message => "Unknown action '%s'",
$self->{action}
);
} while ($self->{next_action});
}
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment