From 79703661d7bad650bfeea6a0997e619fa40d9543 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Fri, 18 May 2012 15:00:46 +0000 Subject: [PATCH] [-] BO : fix #PSCFV-2359 : change name default theme in module themeinstallator git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15388 b9a71923-0436-4b27-9f14-aed3839534dd --- modules/themeinstallator/themeinstallator.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/themeinstallator/themeinstallator.php b/modules/themeinstallator/themeinstallator.php index 47f2286f3..346bdb061 100644 --- a/modules/themeinstallator/themeinstallator.php +++ b/modules/themeinstallator/themeinstallator.php @@ -43,9 +43,11 @@ class ThemeInstallator extends Module private $selected_disable_modules = array(); private $native_modules = array(); private $module_list = array(); - private $hook_list= array(); + private $hook_list = array(); - public $action_form; + private $default_theme = 'default'; + + private $action_form; /* ** index @@ -549,7 +551,7 @@ class ThemeInstallator extends Module if (Validate::isLoadedObject($obj)) { if ($flag++ == 0) - $msg .= ''.$this->l('The following modules have been unhook:').' :
'; + $msg .= ''.$this->l('The following modules have been unhook:').'
'; // Delete all native module which are in the front office feature category and in selected shops $sql = 'DELETE FROM `'._DB_PREFIX_.'module_shop` WHERE `id_module` = '.pSQL($obj->id).' AND `id_shop` = '.(int)$id_shop; @@ -654,7 +656,7 @@ class ThemeInstallator extends Module $ok = array(); foreach ($this->selected_variations as $variation) { - if ($variation == 'prestashop') + if ($variation == $this->default_theme) continue; if ($variation != $theme_directory) @@ -1498,7 +1500,7 @@ class ThemeInstallator extends Module $id = 0; foreach ($this->theme_list as $row) { - if (!is_dir(_PS_ALL_THEMES_DIR_.$row) || !file_exists(_PS_ALL_THEMES_DIR_.$row.'/index.tpl') || $row == 'prestashop' || $row == Tools::getValue('mainTheme')) + if (!is_dir(_PS_ALL_THEMES_DIR_.$row) || !file_exists(_PS_ALL_THEMES_DIR_.$row.'/index.tpl') || $row == $this->default_theme || $row == Tools::getValue('mainTheme')) continue; $this->_html .= 'themes['.$id.'] = "'.$row.'";';