Merge pull request #14615 from atm-lena/FIX_selectModelMailFunction

selectModelMail() : if default and no mail models select default model
This commit is contained in:
Laurent Destailleur 2020-09-03 12:29:59 +02:00 committed by GitHub
commit 67e58f639f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7992,8 +7992,8 @@ class Form
$formmail = new FormMail($db);
$result = $formmail->fetchAllEMailTemplate($modelType, $user, $langs);
if ($default) $TModels[0] = $langs->trans('DefaultMailModel');
if ($result > 0) {
if ($default) $TModels[0] = $langs->trans('DefaultMailModel');
foreach ($formmail->lines_model as $model){
$TModels[$model->id] = $model->label;
}