Update setup.php

This commit is contained in:
Frédéric FRANCE 2021-01-07 18:00:23 +01:00 committed by GitHub
parent 094ea841db
commit 39b03ef962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,9 @@ if ($action == 'updateMask') {
$tmpobjectkey = GETPOST('object');
if (!empty($tmpobjectkey)) {
$constforval = 'MYMODULE_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
if ($conf->global->$constforval == "$value") dolibarr_del_const($db, $constforval, $conf->entity);
if ($conf->global->$constforval == "$value") {
dolibarr_del_const($db, $constforval, $conf->entity);
}
}
}
} elseif ($action == 'setdoc') {
@ -338,9 +340,10 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
$htmltooltip .= ''.$langs->trans("NextValue").': ';
if ($nextval) {
if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured')
if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
$nextval = $langs->trans($nextval);
$htmltooltip .= $nextval.'<br>';
}
$htmltooltip .= $nextval.'<br>';
} else {
$htmltooltip .= $langs->trans($module->error).'<br>';
}