Fix warning

This commit is contained in:
Laurent Destailleur 2024-04-29 20:15:38 +02:00
parent 12c686a767
commit b648fbeee3
2 changed files with 3 additions and 3 deletions

View file

@ -142,7 +142,7 @@ if ($action == 'specimen') {
} elseif ($action == 'del') {
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
if ($conf->global->STOCK_ADDON_PDF == "$value") {
if (getDolGlobalString('STOCK_ADDON_PDF') == "$value") {
dolibarr_del_const($db, 'STOCK_ADDON_PDF', $conf->entity);
}
}
@ -620,7 +620,7 @@ foreach ($dirmodels as $reldir) {
// Default
print '<td class="center">';
if ($conf->global->STOCK_ADDON_PDF == $name) {
if (getDolGlobalString('STOCK_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>';

View file

@ -114,7 +114,7 @@ class doc_generic_stock_odt extends ModelePDFStock
// List of directories area
$texte .= '<tr><td>';
$texttitle = $langs->trans("ListOfDirectories");
$listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->STOCK_ADDON_PDF_ODT_PATH)));
$listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim(getDolGlobalString('STOCK_ADDON_PDF_ODT_PATH'))));
$listoffiles = array();
foreach ($listofdir as $key => $tmpdir) {
$tmpdir = trim($tmpdir);