From 7cd6898585cd5fdd7e41458ffb68d99efc755947 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Thu, 6 Sep 2012 12:36:57 +0000 Subject: [PATCH] [-] TR : fix bug when not have a mobile folder in a theme folder git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17211 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminTranslationsController.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index bd1e34b21..f9a68d346 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -810,13 +810,12 @@ class AdminTranslationsControllerCore extends AdminController switch ($this->type_selected) { case 'front': - $directories['tpl'] = array( - _PS_THEME_SELECTED_DIR_.'/' => scandir(_PS_THEME_SELECTED_DIR_), - _PS_THEME_OVERRIDE_DIR_.'/' => Tools::file_exists_cache(_PS_THEME_OVERRIDE_DIR_) ? scandir(_PS_THEME_OVERRIDE_DIR_) : array(), - _PS_THEME_SELECTED_DIR_.'/mobile/' => scandir(_PS_THEME_SELECTED_DIR_.'/mobile/'), - _PS_THEME_OVERRIDE_DIR_.'/mobile/' => Tools::file_exists_cache(_PS_THEME_OVERRIDE_DIR_.'/mobile/') ? scandir(_PS_THEME_OVERRIDE_DIR_.'/mobile/') : array(), - _PS_ALL_THEMES_DIR_.'/' => scandir(_PS_ALL_THEMES_DIR_) - ); + $directories['tpl'] = array(_PS_ALL_THEMES_DIR_.'/' => scandir(_PS_ALL_THEMES_DIR_)); + $directories['tpl'] = array_merge($directories['tpl'], $this->listFiles(_PS_THEME_SELECTED_DIR_)); + + if (Tools::file_exists_cache(_PS_THEME_OVERRIDE_DIR_)) + $directories['tpl'] = array_merge($directories['tpl'], $this->listFiles(_PS_THEME_OVERRIDE_DIR_)); + break; case 'back':