diff --git a/core/lib/Thelia/Action/Export.php b/core/lib/Thelia/Action/Export.php
index 7f3dffe3b..bdea9f360 100644
--- a/core/lib/Thelia/Action/Export.php
+++ b/core/lib/Thelia/Action/Export.php
@@ -27,14 +27,11 @@ use Thelia\Model\ExportQuery;
*/
class Export extends BaseAction implements EventSubscriberInterface
{
- /**
- * @var ContainerInterface
- */
- protected $container;
+ protected $environment;
- public function __construct(ContainerInterface $container)
+ public function __construct($environment)
{
- $this->container = $container;
+ $this->environment = $environment;
}
public function changeCategoryPosition(UpdatePositionEvent $event)
@@ -54,7 +51,7 @@ class Export extends BaseAction implements EventSubscriberInterface
protected function cacheClear(EventDispatcherInterface $dispatcher)
{
$cacheEvent = new CacheEvent(
- $this->container->getParameter('kernel.cache_dir')
+ $this->environment
);
$dispatcher->dispatch(TheliaEvents::CACHE_CLEAR, $cacheEvent);
diff --git a/core/lib/Thelia/Action/Import.php b/core/lib/Thelia/Action/Import.php
index 37eb610dc..e0aef97b5 100644
--- a/core/lib/Thelia/Action/Import.php
+++ b/core/lib/Thelia/Action/Import.php
@@ -27,14 +27,11 @@ use Thelia\Model\ImportQuery;
*/
class Import extends BaseAction implements EventSubscriberInterface
{
- /**
- * @var ContainerInterface
- */
- protected $container;
+ protected $environment;
- public function __construct(ContainerInterface $container)
+ public function __construct($environment)
{
- $this->container = $container;
+ $this->environment = $environment;
}
public function changeCategoryPosition(UpdatePositionEvent $event)
@@ -54,7 +51,7 @@ class Import extends BaseAction implements EventSubscriberInterface
protected function cacheClear(EventDispatcherInterface $dispatcher)
{
$cacheEvent = new CacheEvent(
- $this->container->getParameter('kernel.cache_dir')
+ $this->environment
);
$dispatcher->dispatch(TheliaEvents::CACHE_CLEAR, $cacheEvent);
diff --git a/core/lib/Thelia/Config/Resources/action.xml b/core/lib/Thelia/Config/Resources/action.xml
index 62e017195..18dc627b2 100644
--- a/core/lib/Thelia/Config/Resources/action.xml
+++ b/core/lib/Thelia/Config/Resources/action.xml
@@ -165,12 +165,12 @@
-
+ %kernel.cache_dir%
-
+ %kernel.cache_dir%
diff --git a/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php b/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php
index 4b6069bdc..654db35f7 100644
--- a/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php
+++ b/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php
@@ -138,7 +138,9 @@ class CSVFormatter extends AbstractFormatter
$value = serialize($value);
}
- return $this->stringDelimiter . addslashes($value) . $this->stringDelimiter . $this->delimiter;
+ $value = str_replace($this->stringDelimiter, "\\" . $this->stringDelimiter, $value);
+
+ return $this->stringDelimiter . $value . $this->stringDelimiter . $this->delimiter;
}
/**