prevent an infinite loop in weird cases.
This commit is contained in:
parent
f814e1af7c
commit
139ff73b49
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ sub page {
|
|||
if (defined($output) and $output eq "") {
|
||||
if ($session->var->isAdminOn) { # they're expecting it to be there, so let's help them add it
|
||||
my $asset = WebGUI::Asset->newByUrl($session, $session->url->getRefererUrl) || WebGUI::Asset->getDefault($session);
|
||||
$session->http->setRedirect($asset->getUrl("func=add;class=WebGUI::Asset::Wobject::Layout;url=".$assetUrl));
|
||||
$session->http->setRedirect($asset->getUrl("func=add;class=WebGUI::Asset::Wobject::Layout;url=".$assetUrl)) unless $session->url->getRequestedUrl eq $session->url->getRefererUrl;
|
||||
} else { # not in admin mode, so can't create it, so display not found
|
||||
$session->http->setStatus("404","Page Not Found");
|
||||
my $notFound = WebGUI::Asset->getNotFound($session);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue