Allow snippets to be really empty, without showing the Page Not Found screen.

This commit is contained in:
Colin Kuskie 2009-07-06 19:35:00 +00:00
parent 508f7ed287
commit d6400799aa
4 changed files with 33 additions and 18 deletions

View file

@ -294,7 +294,7 @@ sub view {
unless ($noCache) {
WebGUI::Cache->new($session,"view_".$calledAsWebMethod."_".$self->getId)->set($output,$self->get("cacheTimeout"));
}
return $output;
return $output;
}
#-------------------------------------------------------------------
@ -311,7 +311,11 @@ sub www_view {
my $mimeType=$self->getValue('mimeType');
$self->session->http->setMimeType($mimeType || 'text/html');
$self->session->http->setCacheControl($self->get("cacheTimeout"));
return $self->view(1);
my $output = $self->view(1);
if (!defined $output) {
$output = 'empty';
}
return $output;
}