- fix [ 1180455 ] assetproxy of a nonexistent asset inserts the page_not_found

This commit is contained in:
Matthew Wilson 2005-05-12 21:07:23 +00:00
parent cbe92e884f
commit f2108d88a2

View file

@ -19,7 +19,8 @@ use WebGUI::Session;
sub process {
my ($url) = WebGUI::Macro::getParams(shift);
my $asset = WebGUI::Asset->newByUrl($url);
if (defined $asset) {
#Sorry, you cannot proxy the notfound page.
if (defined $asset && $asset->getId ne $session{setting}{notFoundPage}) {
$asset->toggleToolbar;
return $asset->canView ? $asset->view : undef;
} else {