From 6fe79bc1c679b8bb987043690c28ae451505ab6f Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 16 Oct 2008 23:39:19 +0000 Subject: [PATCH] BUGFIX: Fix issue with language files not being included git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64471 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/i18n.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/i18n.php b/core/i18n.php index cababae68..83a7c6a59 100755 --- a/core/i18n.php +++ b/core/i18n.php @@ -1042,10 +1042,11 @@ class i18n extends Object { */ static function include_by_class($class) { $module = self::get_owner_module($class); + if(!$module) user_error("i18n::include_by_class: Class {$class} not found", E_USER_WARNING); if (file_exists($file = Director::getAbsFile("$module/lang/". self::get_locale() . '.php'))) { - include_once($file); + include($file); } else if (self::get_locale() != self::$default_locale) { $old = self::get_locale(); self::set_locale(self::$default_locale); @@ -1072,4 +1073,4 @@ class i18n extends Object { } } -?> \ No newline at end of file +?>