Revision 84e1c3e5
Von Sven Schöling vor mehr als 13 Jahren hinzugefügt
SL/Controller/Base.pm | ||
---|---|---|
174 | 174 |
my $action = first { $::form->{"action_${_}"} } @actions; |
175 | 175 |
my $sub = "action_${action}"; |
176 | 176 |
|
177 |
$self->_run_hooks('before', $action); |
|
178 |
$self->$sub(@_); |
|
179 |
$self->_run_hooks('after', $action); |
|
177 |
if ($self->can($sub)) { |
|
178 |
$self->_run_hooks('before', $action); |
|
179 |
$self->$sub(@_); |
|
180 |
$self->_run_hooks('after', $action); |
|
181 |
} else { |
|
182 |
$::form->error($::locale->text('Oops. No valid action found to dispatch. Please report this case to the Lx-Office team.')); |
|
183 |
} |
|
180 | 184 |
} |
181 | 185 |
|
182 | 186 |
sub _template_obj { |
Auch abrufbar als: Unified diff
Anstatt über "action_" zu croaken gibt der Base Controller jetzt eine freundliche Meldung.