Merge pull request #23688 from BB2A/FIX---PHP8--Warnning-admin-commande

FIX - PHP8  Warnning admin commande
This commit is contained in:
Laurent Destailleur 2023-01-25 23:45:28 +01:00 committed by GitHub
commit ca4b7830ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,7 +117,7 @@ if ($action == 'updateMask') {
} elseif ($action == 'del') {
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
if ($conf->global->COMMANDE_ADDON_PDF == "$value") {
if (getDolGlobalString('COMMANDE_ADDON_PDF') == $value) {
dolibarr_del_const($db, 'COMMANDE_ADDON_PDF', $conf->entity);
}
}
@ -461,7 +461,7 @@ foreach ($dirmodels as $reldir) {
// Default
print '<td class="center">';
if ($conf->global->COMMANDE_ADDON_PDF == $name) {
if (getDolGlobalString('COMMANDE_ADDON_PDF') == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';