MINOR take advantage of an alternate path for error pages (from r101883)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112048 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-13 01:18:35 +00:00
parent 5fd242a25b
commit bbdad4207f

View File

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