MINOR take advantage of an alternate path for error pages

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101883 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Tom Rix 2010-03-30 20:41:56 +00:00 committed by Sam Minnee
parent be41f12a4f
commit ccd46b0bcc

View File

@ -177,6 +177,9 @@ class ErrorPage extends Page {
* @return String
*/
static function get_filepath_for_errorcode($statusCode, $locale = null) {
if (singleton('ErrorPage')->hasMethod('alternateFilepathForErrorcode')) {
return singleton('ErrorPage')-> alternateFilepathForErrorcode($statusCode, $locale);
}
if(singleton('SiteTree')->hasExtension('Translatable') && $locale && $locale != Translatable::default_locale()) {
return self::$static_filepath . "/error-{$statusCode}-{$locale}.html";
} else {