Choice of a parameter is lost when saving

This commit is contained in:
Laurent Destailleur 2019-11-26 09:34:42 +01:00
parent cee40561df
commit cd6e81c46f

View File

@ -111,11 +111,15 @@ if ($action == 'setvalue' && $user->admin)
// Payment token for URL
$result = dolibarr_set_const($db, "PAYMENT_SECURITY_TOKEN", GETPOST('PAYMENT_SECURITY_TOKEN', 'alpha'), 'chaine', 0, '', $conf->entity);
if (!$result > 0)
$error++;
$result = dolibarr_set_const($db, "PAYMENT_SECURITY_TOKEN_UNIQUE", GETPOST('PAYMENT_SECURITY_TOKEN_UNIQUE', 'alpha'), 'chaine', 0, '', $conf->entity);
if (!$result > 0)
if (!$result > 0) {
$error++;
}
if (empty($conf->use_javascript_ajax)) {
$result = dolibarr_set_const($db, "PAYMENT_SECURITY_TOKEN_UNIQUE", GETPOST('PAYMENT_SECURITY_TOKEN_UNIQUE', 'alpha'), 'chaine', 0, '', $conf->entity);
if (!$result > 0) {
$error++;
}
}
if (!$error) {
$db->commit();