- fix: Asset menu

- fix: Event Manager - can't add event
 - fix: v6.99.1, security: Spectre listens to INADDR_ANY (profo)
 - fix: Manage groups in this group doesn't work
 - Fixed a problem where the not found page would not display.
 - fix: New page layout instead of not found
This commit is contained in:
JT Smith 2006-05-30 18:57:15 +00:00
parent 2e1de9d214
commit 16bd394434
8 changed files with 76 additions and 20 deletions

View file

@ -197,10 +197,10 @@ sub page {
$output = tryAssetMethod($session,$asset,$method);
$output = tryAssetMethod($session,$asset,"view") unless ($output || ($method eq "view"));
}
if (defined($output) and $output eq "") {
if ($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)) unless $session->url->getRequestedUrl eq $session->url->getRefererUrl;
$output = $asset->addMissing($assetUrl);
} 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);