// fix AdminController translations

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10622 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-11-23 22:21:25 +00:00
parent b7c28b8c48
commit d8fcdf19fe
+13 -11
View File
@@ -295,20 +295,20 @@ class AdminControllerCore extends Controller
$tabs = array_reverse($tabs); $tabs = array_reverse($tabs);
$bread = ''; $bread = '';
switch ($this->display) switch ($this->display)
{ {
case 'edit': case 'edit':
array_pop($tabs); $current_tab = array_pop($tabs);
$tabs[] = array('name' => sprintf($this->l('Edit %s'), $this->table)); $tabs[] = array('name' => sprintf($this->l('Edit %s'), $current_tab['name']));
break; break;
case 'add': case 'add':
array_pop($tabs); $current_tab = array_pop($tabs);
$tabs[] = array('name' => sprintf($this->l('Add %s'), $this->table)); $tabs[] = array('name' => sprintf($this->l('Add %s'), $current_tab['name']));
break; break;
case 'view': case 'view':
array_pop($tabs); $current_tab = array_pop($tabs);
$tabs[] = array('name' => sprintf($this->l('View %s'), $this->table)); $tabs[] = array('name' => sprintf($this->l('View %s'), $current_tab['name']));
break; break;
} }
// note : this should use a tpl file // note : this should use a tpl file
foreach ($tabs AS $key => $item) foreach ($tabs AS $key => $item)
@@ -1572,6 +1572,8 @@ class AdminControllerCore extends Controller
// @todo : change AdminTab to Helper // @todo : change AdminTab to Helper
if ( isset($_LANGADM[$class.$key])) if ( isset($_LANGADM[$class.$key]))
$str = $_LANGADM[$class.$key]; $str = $_LANGADM[$class.$key];
elseif ( isset($_LANGADM['admincontroller'.$key]))
$str = $_LANGADM['admincontroller'.$key];
elseif ( isset($_LANGADM['helper'.$key])) elseif ( isset($_LANGADM['helper'.$key]))
$str = $_LANGADM['helper'.$key]; $str = $_LANGADM['helper'.$key];
elseif ( isset($_LANGADM['admintab'.$key])) elseif ( isset($_LANGADM['admintab'.$key]))
@@ -1611,12 +1613,12 @@ class AdminControllerCore extends Controller
// ob_start(); // ob_start();
if (Tools::getValue('ajax')) if (Tools::getValue('ajax'))
$this->ajax = '1'; $this->ajax = '1';
/* Server Params */ /* Server Params */
$protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; $protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
$protocol_content = (isset($useSSL) && $useSSL && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; $protocol_content = (isset($useSSL) && $useSSL && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
$this->context->link = new Link($protocol_link, $protocol_content); $this->context->link = new Link($protocol_link, $protocol_content);
$this->timerStart = microtime(true); $this->timerStart = microtime(true);
if (isset($_GET['logout'])) if (isset($_GET['logout']))