update code towards php8 compliance
This commit is contained in:
parent
d418968dd8
commit
7dfd7d73cc
@ -249,7 +249,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
|
|
||||||
$objphoto->fetch($object->lines[$i]->fk_product);
|
$objphoto->fetch($object->lines[$i]->fk_product);
|
||||||
//var_dump($objphoto->ref);exit;
|
//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[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).'/';
|
$pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/';
|
||||||
} else {
|
} else {
|
||||||
@ -939,7 +939,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
if (count($filetomerge->lines) > 0) {
|
if (count($filetomerge->lines) > 0) {
|
||||||
foreach ($filetomerge->lines as $linefile) {
|
foreach ($filetomerge->lines as $linefile) {
|
||||||
if (!empty($linefile->id) && !empty($linefile->file_name)) {
|
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")) {
|
if (isModEnabled("product")) {
|
||||||
$filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos";
|
$filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos";
|
||||||
} elseif (isModEnabled("service")) {
|
} elseif (isModEnabled("service")) {
|
||||||
|
|||||||
@ -152,7 +152,7 @@ class pdf_squille extends ModelePdfReception
|
|||||||
$objphoto = new Product($this->db);
|
$objphoto = new Product($this->db);
|
||||||
$objphoto->fetch($object->lines[$i]->fk_product);
|
$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/";
|
$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;
|
$dir = $conf->product->dir_output.'/'.$pdir;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -227,7 +227,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
|||||||
|
|
||||||
$objphoto->fetch($object->lines[$i]->fk_product);
|
$objphoto->fetch($object->lines[$i]->fk_product);
|
||||||
//var_dump($objphoto->ref);exit;
|
//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[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).'/';
|
$pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user