diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 409bf47d715..2262e3dd6ff 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6581,7 +6581,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = ' $path = ''; $arrayforoldpath = array('cheque', 'category', 'holiday', 'supplier_invoice', 'invoice_supplier', 'mailing', 'supplier_payment'); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $arrayforoldpath[] = 'product'; } if (!empty($level) && in_array($modulepart, $arrayforoldpath)) { diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 87291071162..e2973bef0ba 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -183,7 +183,7 @@ function product_prepare_head($object) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); } $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { if (isModEnabled("product") && ($object->type == Product::TYPE_PRODUCT)) { $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos'; } diff --git a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php index 3853b7ae6e2..4b7c2bb0104 100644 --- a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php +++ b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php @@ -241,7 +241,7 @@ class pdf_standard_asset extends ModelePDFAsset if (empty($object->lines[$i]->fk_product)) continue; //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 {