Merge pull request #23620 from FHenry/14_fix_mod_builder

fix: module builder, backport working solution form 15.0
This commit is contained in:
Laurent Destailleur 2023-01-18 20:11:26 +01:00 committed by GitHub
commit 3e7b16e8ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1295,9 +1295,8 @@ if ($dirins && $action == 'addproperty' && empty($cancel) && !empty($module) &&
$error++; $error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors');
} }
}
if (!$error) { if (!$error && !GETPOST('regenerateclasssql') && !GETPOST('regeneratemissing')) {
$addfieldentry = array( $addfieldentry = array(
'name'=>GETPOST('propname', 'aZ09'), 'name'=>GETPOST('propname', 'aZ09'),
'label'=>GETPOST('proplabel', 'alpha'), 'label'=>GETPOST('proplabel', 'alpha'),
@ -1323,6 +1322,9 @@ if ($dirins && $action == 'addproperty' && empty($cancel) && !empty($module) &&
$addfieldentry['arrayofkeyval'] = json_decode($addfieldentry['arrayofkeyval'], true); $addfieldentry['arrayofkeyval'] = json_decode($addfieldentry['arrayofkeyval'], true);
} }
} }
} else {
$addfieldentry = array();
}
/*if (GETPOST('regeneratemissing')) /*if (GETPOST('regeneratemissing'))
{ {