Merge pull request #24100 from frederic34/patch-12

fix module is not mandatory in mail_templates
This commit is contained in:
Laurent Destailleur 2023-03-03 11:48:19 +01:00 committed by GitHub
commit 3247038872
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
*
* 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;
}