update code towards php8 compliance

This commit is contained in:
Philippe GRAND 2022-10-06 16:47:29 +02:00
parent d418968dd8
commit 7dfd7d73cc
3 changed files with 4 additions and 4 deletions

View File

@ -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")) {

View File

@ -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 {

View File

@ -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 {