2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Florian HENRY
2021-03-29 17:26:43 +02:00
parent e18c010490
commit 14a90a3a9d
8 changed files with 168 additions and 13 deletions

View File

@@ -33,7 +33,17 @@ if ($action == 'update' && is_array($arrayofparameters)) {
foreach ($arrayofparameters as $key => $val) {
// Modify constant only if key was posted (avoid resetting key to the null value)
if (GETPOSTISSET($key)) {
$result = dolibarr_set_const($db, $key, GETPOST($key, 'alpha'), 'chaine', 0, '', $conf->entity);
if (preg_match('/category:/', $val['type'])) {
if (GETPOST($key, 'int') == '-1') {
$val_const = '';
} else {
$val_const = GETPOST($key, 'int');
}
} else {
$val_const = GETPOST($key, 'alpha');
}
$result = dolibarr_set_const($db, $key, $val_const, 'chaine', 0, '', $conf->entity);
if ($result < 0) {
$error++;
break;