diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php
index b17753d66b8..517ead4dac0 100644
--- a/htdocs/admin/stock.php
+++ b/htdocs/admin/stock.php
@@ -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 '
';
- if ($conf->global->STOCK_ADDON_PDF == $name) {
+ if (getDolGlobalString('STOCK_ADDON_PDF') == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'';
diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
index 0169810c41e..38be94f3266 100644
--- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
+++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
@@ -114,7 +114,7 @@ class doc_generic_stock_odt extends ModelePDFStock
// List of directories area
$texte .= ' | | ';
$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);
|