Permalink
Browse files

MINOR better error reporting for broken redirector & virtual pages (f…

…rom r97185) (from r98155)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102622 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent b3e30ac commit 447ec71471c3cec8617ade135307faebf02ec228 @chillu chillu committed Apr 13, 2010
Showing with 10 additions and 5 deletions.
  1. +3 −5 core/model/RedirectorPage.php
  2. +7 −0 core/model/VirtualPage.php
View
8 core/model/RedirectorPage.php
@@ -164,12 +164,10 @@ function init() {
/**
* 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
7 core/model/VirtualPage.php
@@ -261,6 +261,13 @@ function hasMethod($method) {
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>';
+ }
}
/**

0 comments on commit 447ec71

Please sign in to comment.