MINOR better error reporting for broken redirector & virtual pages (from r97185)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98155 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-02-04 04:33:22 +00:00
parent 392c5effb7
commit bac3e43ff4
2 changed files with 10 additions and 5 deletions

View File

@ -156,12 +156,10 @@ class RedirectorPage_Controller extends Page_Controller {
/**
* If we ever get this far, it means that the redirection failed.
*/
function index() {
return new SS_HTTPResponse(
"<p class=\"message-setupWithoutRedirect\">" .
function Content() {
return "<p class=\"message-setupWithoutRedirect\">" .
_t('RedirectorPage.HASBEENSETUP', 'A redirector page has been set up without anywhere to redirect to.') .
"</p>"
);
"</p>";
}
}
?>

View File

@ -261,6 +261,13 @@ class VirtualPage extends Page {
if (!$haveIt) $haveIt = $this->copyContentFrom()->hasMethod($method);
return $haveIt;
}
/**
* If we ever get this far, it means that the VP failed.
*/
function Content() {
return '<p>'._t('VirtualPage.NOTFOUND', 'We could not find the content for this virtual page.').'</p>';
}
}
/**