From c587934e258241eec5a3bc2bbd6581a8a3dd5ce6 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Mon, 29 Apr 2013 11:16:26 +0200 Subject: [PATCH] [-] BO : fixed automatic creation of email overrides in the template #PSCFV-8785 --- controllers/admin/AdminTranslationsController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index 9b360eb8b..66dc641f0 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -1454,6 +1454,8 @@ class AdminTranslationsControllerCore extends AdminController $path = $arr_mail_path[$group_name]; if ($module_name) $path = str_replace('{module}', $module_name, $path); + if (!file_exists($path) && !mkdir($path, 0777, true)) + throw new PrestaShopException(sprintf(Tools::displayError('Directory "%s" cannot be created'), dirname($file_path))); file_put_contents($path.$mail_name.'.'.$type_content, $content); } else