mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
5fd242a25b
commit
bbdad4207f
@ -176,6 +176,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 {
|
||||
|
Loading…
Reference in New Issue
Block a user