diff --git a/Config/module.xml b/Config/module.xml
index a524ebe..acc92c3 100644
--- a/Config/module.xml
+++ b/Config/module.xml
@@ -13,7 +13,7 @@
en_US
fr_FR
- 1.1.3
+ 1.1.4
Loïc MO
diff --git a/Controller/ConfigurationController.php b/Controller/ConfigurationController.php
index 2745b91..4ebb194 100644
--- a/Controller/ConfigurationController.php
+++ b/Controller/ConfigurationController.php
@@ -10,6 +10,7 @@
use HeaderHighlights\Model\HeaderHighlightsImageQuery;
use Exception;
use Propel\Runtime\Exception\PropelException;
+use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\RequestStack;
@@ -150,5 +151,17 @@ private function headerHighlights(
->setTitle($formData['title' . $id])
->setDescription($formData['catchphrase' . $id])
->save();
+
+ $this->emptyImageCache($headerHighlightsImage->getId());
+ }
+
+ private function emptyImageCache($imageId)
+ {
+ $cacheDir = THELIA_WEB_DIR."legacy-image-library".DS.'headerHighlights_image_'.$imageId;
+
+ $fs = new Filesystem();
+ if (is_dir($cacheDir)){
+ $fs->remove($cacheDir);
+ }
}
}