From 6db76c187eb60fbb2d2d02e70554a043b1b62e52 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Fri, 27 Jul 2012 14:14:07 +0000 Subject: [PATCH] [-] TR : fix #PSCFV-3374 --- classes/controller/AdminController.php | 4 ++-- classes/helper/Helper.php | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 6ad2863ac..ffec5ca2e 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -2631,10 +2631,10 @@ class AdminControllerCore extends Controller // If view access is denied, we want to use the default template that will be used to display an error if ($this->viewAccess() && $this->override_folder) { - if (file_exists($this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$tpl_name)) - return $this->context->smarty->createTemplate('controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$tpl_name, $this->context->smarty); if (file_exists($this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$tpl_name)) return $this->context->smarty->createTemplate($this->override_folder.$tpl_name, $this->context->smarty); + else if (file_exists($this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$tpl_name)) + return $this->context->smarty->createTemplate('controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$tpl_name, $this->context->smarty); } return $this->context->smarty->createTemplate($this->context->smarty->getTemplateDir(0).$tpl_name, $this->context->smarty); diff --git a/classes/helper/Helper.php b/classes/helper/Helper.php index de0250031..0fa7e758c 100755 --- a/classes/helper/Helper.php +++ b/classes/helper/Helper.php @@ -87,10 +87,11 @@ class HelperCore $override_tpl_path = _PS_MODULE_DIR_.$this->module->name.'/views/templates/admin/_configure/'.$this->override_folder.$this->base_folder.$tpl_name; else { - if (file_exists($this->context->smarty->getTemplateDir(0).DIRECTORY_SEPARATOR.'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name)) - $override_tpl_path = $this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name; - elseif (file_exists($this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name)) + if (file_exists($this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name)) $override_tpl_path = $this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name; + else if (file_exists($this->context->smarty->getTemplateDir(0).DIRECTORY_SEPARATOR.'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name)) + $override_tpl_path = $this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name; + } } else if ($this->module)