diff --git a/install-dev/models/install.php b/install-dev/models/install.php
index e652d8528..2d83c6707 100644
--- a/install-dev/models/install.php
+++ b/install-dev/models/install.php
@@ -369,10 +369,13 @@ class InstallModelInstall extends InstallAbstractModel
{
// Clear smarty cache
Tools::clearSmartyCache();
-
+
//clear image cache in tmp folder
- Tools::deleteDirectory(_PS_TMP_IMG_DIR_, false);
-
+ if (file_exists(_PS_TMP_IMG_DIR_))
+ foreach (scandir(_PS_TMP_IMG_DIR_) as $file)
+ if ($file[0] != '.' && $file != 'index.php')
+ self::deleteDirectory($dir.DIRECTORY_SEPARATOR.$file);
+
$default_data = array(
'shop_name' => 'My Shop',
'shop_activity' => '',
@@ -395,7 +398,7 @@ class InstallModelInstall extends InstallAbstractModel
// use the old image system if the safe_mod is enabled otherwise the installer will fail with the fixtures installation
if (InstallSession::getInstance()->safe_mode)
- Configuration::updateGlobalValue('PS_LEGACY_IMAGES', 1);
+ Configuration::updateGlobalValue('PS_LEGACY_IMAGES', 1);
$id_country = Country::getByIso($data['shop_country']);
diff --git a/modules/blockcategories/category-tree-branch.tpl b/modules/blockcategories/category-tree-branch.tpl
index d420cc3fc..63bbcb73e 100644
--- a/modules/blockcategories/category-tree-branch.tpl
+++ b/modules/blockcategories/category-tree-branch.tpl
@@ -24,7 +24,8 @@
*}
- {$node.name|escape:'htmlall':'UTF-8'}
+ {$node.name|escape:'htmlall':'UTF-8'}
{if $node.children|@count > 0}
{foreach from=$node.children item=child name=categoryTreeBranch}
diff --git a/themes/default/modules/blockcategories/category-tree-branch.tpl b/themes/default/modules/blockcategories/category-tree-branch.tpl
index d420cc3fc..63bbcb73e 100644
--- a/themes/default/modules/blockcategories/category-tree-branch.tpl
+++ b/themes/default/modules/blockcategories/category-tree-branch.tpl
@@ -24,7 +24,8 @@
*}
-
- {$node.name|escape:'htmlall':'UTF-8'}
+ {$node.name|escape:'htmlall':'UTF-8'}
{if $node.children|@count > 0}
{foreach from=$node.children item=child name=categoryTreeBranch}
diff --git a/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php b/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php
index fca897d9f..cf6dba95a 100644
--- a/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php
+++ b/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php
@@ -178,7 +178,7 @@
$_cacheDirs = new RecursiveDirectoryIterator($_dir);
$_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
foreach ($_cache as $_file) {
- if (substr(basename($_file->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
+ if (substr(basename($_file->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, 'index.php') !== false) continue;
// directory ?
if ($_file->isDir()) {
if (!$_cache->isDot()) {