[-] BO : Fixed bug #PSFV-276. Translates work with module tab
This commit is contained in:
1 parent
51880120e5
commit
d759de9ec8
3 files changed
+5
-3
No files matched your search
@@ -1617,11 +1617,12 @@ class AdminControllerCore extends Controller
|
|||||||
// For traductions in a tpl folder with an underscore
|
// For traductions in a tpl folder with an underscore
|
||||||
$class = str_replace('_', '', $class);
|
$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 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);
|
$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));
|
$key = md5(str_replace('\'', '\\\'', $string));
|
||||||
|
|||||||
+1
-1
@@ -769,7 +769,7 @@ abstract class ModuleCore
|
|||||||
{
|
{
|
||||||
// Module can now define AdminTab keeping the module translations method,
|
// Module can now define AdminTab keeping the module translations method,
|
||||||
// i.e. in modules/[module name]/[iso_code].php
|
// i.e. in modules/[module name]/[iso_code].php
|
||||||
if (!isset(self::$classInModule[$currentClass]))
|
if (!isset(self::$classInModule[$currentClass]) && class_exists($currentClass))
|
||||||
{
|
{
|
||||||
global $_MODULES;
|
global $_MODULES;
|
||||||
$_MODULE = array();
|
$_MODULE = array();
|
||||||
|
|||||||
@@ -2213,6 +2213,7 @@ class ProductCore extends ObjectModel
|
|||||||
die(Tools::displayError());
|
die(Tools::displayError());
|
||||||
// Initializations
|
// Initializations
|
||||||
$id_group = (isset($context->customer) ? $context->customer->id_default_group : _PS_DEFAULT_CUSTOMER_GROUP_);
|
$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))
|
if (!is_object($cur_cart) || (Validate::isUnsignedInt($id_cart) && $id_cart))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in new issue
Block a user