[-] BO : Fixed bug #PSFV-276. Translates work with module tab

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11891 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vSchoener
2011-12-29 14:45:59 +00:00
parent 288e84cc64
commit 2f7f6b3a3b
3 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -1617,11 +1617,12 @@ class AdminControllerCore extends Controller
// For traductions in a tpl folder with an underscore
$class = str_replace('_', '', $class);
$class_name_controller = $class.'controller';
// if the class is extended by a module, use modules/[module_name]/xx.php lang file
if (false && Module::getModuleNameFromClass($class))
if (class_exists($class_name_controller) && Module::getModuleNameFromClass($class_name_controller))
{
$string = str_replace('\'', '\\\'', $string);
return Module::findTranslation(Module::$classInModule[$class], $string, $class);
return Module::findTranslation(Module::$classInModule[$class_name_controller], $string, $class_name_controller);
}
$key = md5(str_replace('\'', '\\\'', $string));