Revision abd4a0b0
Von Sven Schöling vor etwa 13 Jahren hinzugefügt
SL/Controller/Base.pm | ||
---|---|---|
my $self = shift;
|
||
my $url = $self->url_for(@_);
|
||
|
||
if ($self->delay_flash_on_redirect) {
|
||
require SL::Helper::Flash;
|
||
SL::Helper::Flash::delay_flash();
|
||
}
|
||
|
||
print $::request->{cgi}->redirect($url);
|
||
}
|
||
|
||
... | ... | |
}
|
||
}
|
||
|
||
#
|
||
# behaviour. override these
|
||
#
|
||
|
||
sub delay_flash_on_redirect {
|
||
0;
|
||
}
|
||
|
||
#
|
||
# private functions -- for use in Base only
|
||
#
|
||
... | ... | |
|
||
The hook's return values are discarded.
|
||
|
||
=item delay_flash_on_redirect
|
||
|
||
May be overridden by a controller. If this method returns true, redirect_to
|
||
will delay all flash messages for the current request. Defaults to false for
|
||
compatibility reasons.
|
||
|
||
=back
|
||
|
||
=head2 PRIVATE FUNCTIONS
|
Auch abrufbar als: Unified diff
delay_flash_on_redirect Magie im Basecontroller.
Wenn von einem Controller explizit überladen, wird der normale Föash vor einem
redirect_to automatisch upgegradet in ein flash_later.
Conflicts: