// when upgrade, do not add theme dir if its starts by a point, or is named 'prestashop'

This commit is contained in:
mMarinetti
2011-12-22 22:06:08 +00:00
parent 8244247513
commit 6423091da9

View File

@@ -8,7 +8,7 @@ function create_multistore()
$themes = scandir(dirname(__FILE__).'/../../themes');
foreach ($themes AS $theme)
if (is_dir(dirname(__FILE__).'/../../themes/'.$theme) && $theme != '.' && $theme != '..' && $theme != 'prestashop')
if (is_dir(dirname(__FILE__).'/../../themes/'.$theme) && $theme[0] != '.' && $theme != 'prestashop')
$res &= Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'theme (`id_theme`, `name`) VALUES(\'\', \''.pSQL($theme).'\')');
$res &= Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'shop
SET