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

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13259 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mMarinetti
2012-02-13 14:57:21 +00:00
parent 9ef6ddb636
commit 5907fa7806
@@ -586,18 +586,16 @@ class ThemeInstallator extends Module
{
if ($variation == 'prestashop')
continue;
$target_dir = _PS_ALL_THEMES_DIR_.$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);
$new_theme = new Theme();
$new_theme->name = (string)$this->xml['name'];
if (isset($this->xml['directory']))
$new_theme->directory = (string)$this->xml['directory'];
else
$new_theme->directory = (string)$this->xml['name'];
$new_theme->directory = $theme_directory;
$res &= $new_theme->add();
if ($res)