[-] BO : #PSTEST-401 - Bug Fixed in SVN
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12322 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -61,7 +61,6 @@ function smartyTranslate($params, &$smarty)
|
||||
$filename = ((!isset($smarty->compiler_object) OR !is_object($smarty->compiler_object->template)) ? $smarty->template_resource : $smarty->compiler_object->template->getTemplateFilepath());
|
||||
// 1.5 admin : default filename is .tpl; test is made on dir
|
||||
$dir_filename = dirname($filename);
|
||||
|
||||
// key is Helper if dir contains "helper"
|
||||
// we may improve this later to get only the first directory everytime
|
||||
if(strpos($dir_filename, 'helper') !== false)
|
||||
@@ -70,15 +69,14 @@ function smartyTranslate($params, &$smarty)
|
||||
switch ($dir_filename)
|
||||
{
|
||||
// note : this may be modified later
|
||||
case '.':
|
||||
$class = 'index';
|
||||
break;
|
||||
case 'helper':
|
||||
$class = 'AdminTab';
|
||||
break;
|
||||
default:
|
||||
// Remove "controllers/" part from "controllers/XXX"
|
||||
$class = 'Admin'.ucfirst(substr($dir_filename, 12));
|
||||
case '.': $class = 'index';break;
|
||||
case 'helper' : $class = 'AdminTab';break;
|
||||
default :
|
||||
{
|
||||
$parentClass = explode('/', $filename);
|
||||
$key = array_search('controllers', $parentClass);
|
||||
$class = 'Admin'.ucfirst($parentClass[$key + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
if(in_array($class, array('header','footer','password','login')))
|
||||
|
||||
Reference in New Issue
Block a user