// fix #PSTEST-490 : imported theme are now correctly added (some themes with variations, like cloth, wasn't

This commit is contained in:
mMarinetti
2012-02-13 14:57:21 +00:00
parent db61ab10c0
commit fbd495719d
@@ -586,18 +586,16 @@ class ThemeInstallator extends Module
{ {
if ($variation == 'prestashop') if ($variation == 'prestashop')
continue; continue;
$target_dir = _PS_ALL_THEMES_DIR_.$theme_directory;
if ($variation != $theme_directory) if ($variation != $theme_directory)
$target_dir .= $variation; $theme_directory .= $variation;
$target_dir = _PS_ALL_THEMES_DIR_.$theme_directory;
$res &= self::recurseCopy(_IMPORT_FOLDER_.'themes/'.$variation, $target_dir); $res &= self::recurseCopy(_IMPORT_FOLDER_.'themes/'.$variation, $target_dir);
$new_theme = new Theme(); $new_theme = new Theme();
$new_theme->name = (string)$this->xml['name']; $new_theme->name = (string)$this->xml['name'];
if (isset($this->xml['directory'])) $new_theme->directory = $theme_directory;
$new_theme->directory = (string)$this->xml['directory'];
else
$new_theme->directory = (string)$this->xml['name'];
$res &= $new_theme->add(); $res &= $new_theme->add();
if ($res) if ($res)