From 4a042544cc9d3f62ddf101fd1ac442b34b9691c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 2 Mar 2023 23:39:22 +0100 Subject: [PATCH] fix module is not mandatory in mail_templates --- htdocs/admin/mails_templates.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index c9434f216bb..47e4939ef82 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -11,7 +11,7 @@ * Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud - * Copyright (C) 2018-2021 Frédéric France + * Copyright (C) 2018-2023 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -307,13 +307,7 @@ if (empty($reshook)) { $ok = 1; foreach ($listfield as $f => $value) { // Not mandatory fields - if ($value == 'joinfiles') { - continue; - } - if ($value == 'content') { - continue; - } - if ($value == 'content_lines') { + if (in_array($value, ['joinfiles', 'content', 'content_lines', 'module'])) { continue; }