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:
Colin Kuskie 2006-11-19 05:17:15 +00:00
parent e5b7de2253
commit b1bbf36825
2 changed files with 19 additions and 0 deletions

View file

@ -3,6 +3,7 @@
- fix: Workflow form control edit button won't work. removed.
- fix: Bug in HttpProxy.pm
- fix: Storage::Image copy does not create thumbnails
- fix: Static export - redirect problems
7.2.1
- Made a change to version tag commits to deal with unusually long commit

View file

@ -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.