[-] 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:
mBertholino
2012-01-10 16:27:22 +00:00
parent cc39c8fe15
commit 6c6aeb7aed
12 changed files with 731 additions and 744 deletions
+8 -10
View File
@@ -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')))