// fixed translations problems due to r11899
This commit is contained in:
@@ -1072,7 +1072,7 @@ class AdminStockManagementControllerCore extends AdminController
|
||||
'action' => self::$cache_lang['AddStock'],
|
||||
));
|
||||
|
||||
return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_addstock.tpl');
|
||||
return $this->context->smarty->fetch('helper/list/list_action_addstock.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1093,7 +1093,7 @@ class AdminStockManagementControllerCore extends AdminController
|
||||
'action' => self::$cache_lang['RemoveStock'],
|
||||
));
|
||||
|
||||
return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_removestock.tpl');
|
||||
return $this->context->smarty->fetch('helper/list/list_action_removestock.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1114,6 +1114,6 @@ class AdminStockManagementControllerCore extends AdminController
|
||||
'action' => self::$cache_lang['TransferStock'],
|
||||
));
|
||||
|
||||
return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_transferstock.tpl');
|
||||
return $this->context->smarty->fetch('helper/list/list_action_transferstock.tpl');
|
||||
}
|
||||
}
|
||||
@@ -1306,7 +1306,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
'action' => self::$cache_lang['Receipt'],
|
||||
));
|
||||
|
||||
return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_supply_order_receipt.tpl');
|
||||
return $this->context->smarty->fetch('helper/list/list_action_supply_order_receipt.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1327,7 +1327,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
'action' => self::$cache_lang['State'],
|
||||
));
|
||||
|
||||
return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_supply_order_change_state.tpl');
|
||||
return $this->context->smarty->fetch('helper/list/list_action_supply_order_change_state.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1352,7 +1352,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
'action' => self::$cache_lang['CreateSupplyOrder'],
|
||||
));
|
||||
|
||||
return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/helper/list/list_action_supply_order_create_from_template.tpl');
|
||||
return $this->context->smarty->fetch('helper/list/list_action_supply_order_create_from_template.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -974,7 +974,7 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
/* List templates to parse */
|
||||
$templates = $this->listFiles(_PS_ADMIN_DIR_.DIRECTORY_SEPARATOR.'themes'.DIRECTORY_SEPARATOR.'template');
|
||||
$templates = $this->listFiles(_PS_ADMIN_DIR_.DIRECTORY_SEPARATOR.'themes');
|
||||
foreach ($templates as $template)
|
||||
if (preg_match('/^(.*).tpl$/', $template))
|
||||
{
|
||||
@@ -983,13 +983,16 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
|
||||
// get controller name instead of file name
|
||||
$prefix_key = Tools::toCamelCase(str_replace(_PS_ADMIN_DIR_.DIRECTORY_SEPARATOR.'themes'.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR, '', $tpl), true);
|
||||
$prefix_key = 'Admin'.substr($prefix_key, 0, strpos($prefix_key, DIRECTORY_SEPARATOR));
|
||||
$pos = strrpos($prefix_key, DIRECTORY_SEPARATOR);
|
||||
$tmp = substr($prefix_key, 0, $pos);
|
||||
$prefix_key = 'Admin'.ucfirst(substr($tmp, strrpos($tmp, DIRECTORY_SEPARATOR) + 1, $pos));
|
||||
|
||||
if ($prefix_key == 'AdminHelper')
|
||||
$prefix_key = 'Helper';
|
||||
|
||||
// @todo retrompatibility : we assume here than files directly in template/
|
||||
// use the prefix "AdminController" (like old php files 'header', 'footer.inc', 'index', 'login', 'password', 'functions'
|
||||
if ( $prefix_key == 'Admin')
|
||||
if ( $prefix_key == 'Admin' || $prefix_key == 'AdminTemplate')
|
||||
$prefix_key = 'AdminController';
|
||||
// and helpers in helper
|
||||
|
||||
|
||||
Reference in New Issue
Block a user