Fix exporting of a redirect. The view method in the Redirect sets
a HTTP header and returns "1", which doesn't create a redirect. I fixed this by: - Writing a exportHtml_view method just for Redirect. - using the Fail Safe style template to output an empty page with a redirect tag in the header.
This commit is contained in:
parent
e5b7de2253
commit
b1bbf36825
2 changed files with 19 additions and 0 deletions
|
|
@ -91,6 +91,24 @@ sub www_edit {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 exportHtml_view
|
||||
|
||||
A web executable method that redirects the user to the specified page, or displays the edit interface when admin mode is enabled.
|
||||
|
||||
=cut
|
||||
|
||||
sub exportHtml_view {
|
||||
my $self = shift;
|
||||
return $self->session->privilege->noAccess() unless $self->canView;
|
||||
my $url = $self->get("redirectUrl");
|
||||
WebGUI::Macro::process($self->session, \$url);
|
||||
return '' if ($url eq $self->get("url"));
|
||||
$self->session->http->setRedirect($url);
|
||||
return $self->session->style->process('', 'PBtmpl0000000000000060');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_view
|
||||
|
||||
A web executable method that redirects the user to the specified page, or displays the edit interface when admin mode is enabled.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue