[*] BO : export name tabs by ISO code : check name of tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15997 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
753f07f69a
commit
b8c048c47b
1 file changed
+10
-1
@@ -363,13 +363,22 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
|
|
||||||
public function exportTabs()
|
public function exportTabs()
|
||||||
{
|
{
|
||||||
// Get tabs by iso code
|
// Get name tabs by iso code
|
||||||
$tabs = Tab::getTabs($this->lang_selected->id);
|
$tabs = Tab::getTabs($this->lang_selected->id);
|
||||||
|
|
||||||
|
// Get name of the default tabs
|
||||||
|
$id_lang_default = Configuration::get('PS_LANG_DEFAULT', null, (int)$this->context->shop->id_shop_group, (int)$this->context->shop->id);
|
||||||
|
$tabs_default_lang = Tab::getTabs($id_lang_default);
|
||||||
|
|
||||||
|
$tabs_default = array();
|
||||||
|
foreach ($tabs_default_lang as $tab)
|
||||||
|
$tabs_default[$tab['class_name']] = utf8_decode($tab['name']);
|
||||||
|
|
||||||
// Create content
|
// Create content
|
||||||
$content = "<?php\n\n\$tabs = array();";
|
$content = "<?php\n\n\$tabs = array();";
|
||||||
if (!empty($tabs))
|
if (!empty($tabs))
|
||||||
foreach ($tabs as $tab)
|
foreach ($tabs as $tab)
|
||||||
|
if ($tabs_default[$tab['class_name']] != utf8_decode($tab['name']))
|
||||||
$content .= "\n\$tabs['".$tab['class_name']."'] = '".utf8_decode($tab['name'])."';";
|
$content .= "\n\$tabs['".$tab['class_name']."'] = '".utf8_decode($tab['name'])."';";
|
||||||
$content .= "\n\nreturn \$tabs;";
|
$content .= "\n\nreturn \$tabs;";
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user