diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 8698f370d31..0da947cdd95 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -249,7 +249,7 @@ class pdf_cyan extends ModelePDFPropales $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -939,7 +939,7 @@ class pdf_cyan extends ModelePDFPropales if (count($filetomerge->lines) > 0) { foreach ($filetomerge->lines as $linefile) { if (!empty($linefile->id) && !empty($linefile->file_name)) { - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { if (isModEnabled("product")) { $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; } elseif (isModEnabled("service")) { diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 6e970f198be..cc24bda817d 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -152,7 +152,7 @@ class pdf_squille extends ModelePdfReception $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index 925813a1036..381710e2697 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -227,7 +227,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else {