[-] BO : Fixed bug #PSFV-276. Translates work with module tab
This commit is contained in:
@@ -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));
|
||||
|
||||
+1
-1
@@ -769,7 +769,7 @@ abstract class ModuleCore
|
||||
{
|
||||
// Module can now define AdminTab keeping the module translations method,
|
||||
// i.e. in modules/[module name]/[iso_code].php
|
||||
if (!isset(self::$classInModule[$currentClass]))
|
||||
if (!isset(self::$classInModule[$currentClass]) && class_exists($currentClass))
|
||||
{
|
||||
global $_MODULES;
|
||||
$_MODULE = array();
|
||||
|
||||
@@ -2213,6 +2213,7 @@ class ProductCore extends ObjectModel
|
||||
die(Tools::displayError());
|
||||
// Initializations
|
||||
$id_group = (isset($context->customer) ? $context->customer->id_default_group : _PS_DEFAULT_CUSTOMER_GROUP_);
|
||||
//var_dump($id_group);
|
||||
if (!is_object($cur_cart) || (Validate::isUnsignedInt($id_cart) && $id_cart))
|
||||
{
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user