update code towards php8 compliance
This commit is contained in:
parent
82c7a6e9f0
commit
016ede5b6b
@ -5630,7 +5630,7 @@ class Product extends CommonObject
|
|||||||
$result = 0;
|
$result = 0;
|
||||||
|
|
||||||
$dir = $sdir;
|
$dir = $sdir;
|
||||||
if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
|
if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) {
|
||||||
$dir .= '/'.get_exdir($this->id, 2, 0, 0, $this, 'product').$this->id."/photos";
|
$dir .= '/'.get_exdir($this->id, 2, 0, 0, $this, 'product').$this->id."/photos";
|
||||||
} else {
|
} else {
|
||||||
$dir .= '/'.get_exdir(0, 0, 0, 0, $this, 'product').dol_sanitizeFileName($this->ref);
|
$dir .= '/'.get_exdir(0, 0, 0, 0, $this, 'product').dol_sanitizeFileName($this->ref);
|
||||||
@ -5675,7 +5675,7 @@ class Product extends CommonObject
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$dir = $sdir;
|
$dir = $sdir;
|
||||||
if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
|
if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) {
|
||||||
$dir .= '/'.get_exdir($this->id, 2, 0, 0, $this, 'product').$this->id."/photos/";
|
$dir .= '/'.get_exdir($this->id, 2, 0, 0, $this, 'product').$this->id."/photos/";
|
||||||
} else {
|
} else {
|
||||||
$dir .= '/'.get_exdir(0, 0, 0, 0, $this, 'product');
|
$dir .= '/'.get_exdir(0, 0, 0, 0, $this, 'product');
|
||||||
|
|||||||
@ -217,7 +217,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
|
|||||||
|
|
||||||
$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