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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102622 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-13 02:27:30 +00:00
parent b3e30ac819
commit 447ec71471
2 changed files with 10 additions and 5 deletions

View File

@ -164,12 +164,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>';
}
}
/**