- Fixed a macro processing problem on the Redirect asset.
- Added a log info entry when a redirect occurs.
This commit is contained in:
parent
e6aafa2f7f
commit
af84fb43af
3 changed files with 8 additions and 4 deletions
|
|
@ -38,6 +38,9 @@
|
||||||
- fix: Can not make Shortcut for CollaborationSystem
|
- fix: Can not make Shortcut for CollaborationSystem
|
||||||
- fix: EMS Transactions Dropping Free Events
|
- fix: EMS Transactions Dropping Free Events
|
||||||
- fix: EMS Prerequisite Cache Stale
|
- fix: EMS Prerequisite Cache Stale
|
||||||
|
- Fixed a macro processing problem on the Redirect asset.
|
||||||
|
- Added a log info entry when a redirect occurs.
|
||||||
|
|
||||||
|
|
||||||
6.99.3
|
6.99.3
|
||||||
- Someone removed the status from the submission templates. That has been
|
- Someone removed the status from the submission templates. That has been
|
||||||
|
|
|
||||||
|
|
@ -101,17 +101,17 @@ sub www_view {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return $self->session->privilege->noAccess() unless $self->canView;
|
return $self->session->privilege->noAccess() unless $self->canView;
|
||||||
my $i18n = WebGUI::International->new($self->session, "Asset_Redirect");
|
my $i18n = WebGUI::International->new($self->session, "Asset_Redirect");
|
||||||
|
my $url = $self->get("redirectUrl");
|
||||||
|
WebGUI::Macro::process($self->session, \$url);
|
||||||
if ($self->session->var->isAdminOn() && $self->canEdit) {
|
if ($self->session->var->isAdminOn() && $self->canEdit) {
|
||||||
return $self->getAdminConsole->render($i18n->get("what do you want to do with this redirect").'
|
return $self->getAdminConsole->render($i18n->get("what do you want to do with this redirect").'
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="'.$self->get("redirectUrl").'">'.$i18n->get("go to the redirect url").'</a></li>
|
<li><a href="'.$url.'">'.$i18n->get("go to the redirect url").'</a></li>
|
||||||
<li><a href="'.$self->getUrl("func=edit").'">'.$i18n->get("edit the redirect properties").'</a></li>
|
<li><a href="'.$self->getUrl("func=edit").'">'.$i18n->get("edit the redirect properties").'</a></li>
|
||||||
<li><a href="'.$self->getParent->getUrl.'">'.$i18n->get("go to the redirect parent page").'</a></li>
|
<li><a href="'.$self->getParent->getUrl.'">'.$i18n->get("go to the redirect parent page").'</a></li>
|
||||||
</ul>',$i18n->get("assetName"));
|
</ul>',$i18n->get("assetName"));
|
||||||
}
|
}
|
||||||
my $url = $self->get("redirectUrl");
|
$self->session->http->setRedirect($url) unless $url eq $self->get("url");
|
||||||
WebGUI::Macro::process(\$url);
|
|
||||||
$self->session->http->setRedirect($url) unless $self->get("redirectUrl") eq $self->get("url");
|
|
||||||
return $i18n->get('self_referential');
|
return $i18n->get('self_referential');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -367,6 +367,7 @@ sub setRedirect {
|
||||||
my $url = shift;
|
my $url = shift;
|
||||||
my @params = $self->session->form->param;
|
my @params = $self->session->form->param;
|
||||||
return undef if ($url eq $self->session->url->page() && scalar(@params) < 1); # prevent redirecting to self
|
return undef if ($url eq $self->session->url->page() && scalar(@params) < 1); # prevent redirecting to self
|
||||||
|
$self->session->errorHandler->info("Redirecting to $url");
|
||||||
$self->{_http}{location} = $url;
|
$self->{_http}{location} = $url;
|
||||||
$self->setStatus("302", "Redirect");
|
$self->setStatus("302", "Redirect");
|
||||||
$self->session->style->setMeta({"http-equiv"=>"refresh",content=>"0; URL=".$url});
|
$self->session->style->setMeta({"http-equiv"=>"refresh",content=>"0; URL=".$url});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue