From 7cbaada8443edbb1089f32b16ca6d7c233239fc8 Mon Sep 17 00:00:00 2001 From: ldecoker Date: Tue, 22 Oct 2013 17:00:56 +0200 Subject: [PATCH] [BO][-] Notice messages when accessing the BO translation page When accessing the translation part with "core translation" , you got 2 errors: Notice: Use of undefined constant _PS_THEME_SELECTED_DIR_ - assumed '_PS_THEME_SELECTED_DIR_' in controllers\admin\AdminTranslationsController.php on line 1018 Notice: Use of undefined constant _PS_THEME_SELECTED_DIR_ - assumed '_PS_THEME_SELECTED_DIR_' in \controllers\admin\AdminTranslationsController.php on line 1026 It's because the variable $this->theme_selected is not set for that case. --- controllers/admin/AdminTranslationsController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index 57ad71856..d5fe4b7db 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -1221,6 +1221,8 @@ class AdminTranslationsControllerCore extends AdminController // Set the path of selected theme if ($this->theme_selected) define('_PS_THEME_SELECTED_DIR_', _PS_ROOT_DIR_.'/themes/'.$this->theme_selected.'/'); + else + define('_PS_THEME_SELECTED_DIR_', ''); // Get type of translation if (($type = Tools::getValue('type')) && !is_array($type))