Skip to content

Commit

Permalink
Merge pull request #4499 from k-yamamura/bugfix-admin-mailcontroller
Browse files Browse the repository at this point in the history
メール設定画面でメール本文を修正しても反映されない不具合修正
  • Loading branch information
okazy authored Jul 1, 2020
2 parents 040a470 + a5d0b70 commit 4c4585c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Eccube/Controller/Admin/Setting/Shop/MailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Eccube\Event\EventArgs;
use Eccube\Form\Type\Admin\MailType;
use Eccube\Repository\MailTemplateRepository;
use Eccube\Util\CacheUtil;
use Eccube\Util\StringUtil;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Filesystem\Filesystem;
Expand Down Expand Up @@ -51,7 +52,7 @@ public function __construct(MailTemplateRepository $mailTemplateRepository)
* @Route("/%eccube_admin_route%/setting/shop/mail/{id}", requirements={"id" = "\d+"}, name="admin_setting_shop_mail_edit")
* @Template("@admin/Setting/Shop/mail.twig")
*/
public function index(Request $request, MailTemplate $Mail = null, Environment $twig)
public function index(Request $request, MailTemplate $Mail = null, Environment $twig, CacheUtil $cacheUtil)
{
$builder = $this->formFactory
->createBuilder(MailType::class, $Mail);
Expand Down Expand Up @@ -128,6 +129,9 @@ public function index(Request $request, MailTemplate $Mail = null, Environment $

$this->addSuccess('admin.common.save_complete', 'admin');

// キャッシュの削除
$cacheUtil->clearTwigCache();

return $this->redirectToRoute('admin_setting_shop_mail_edit', ['id' => $Mail->getId()]);
}
}
Expand Down

0 comments on commit 4c4585c

Please sign in to comment.