Fix option CAT_HIGH_QUALITY_IMAGES

This commit is contained in:
Laurent Destailleur 2021-05-28 18:15:26 +02:00
parent 94467ea8cf
commit 4f6385338a
3 changed files with 27 additions and 6 deletions

View File

@ -240,8 +240,15 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$realpath = '';
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) {
$filename = $obj['photo'];
//if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette'];
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
if ($obj['photo_vignette']) {
$filename = $obj['photo_vignette'];
} else {
$filename = $obj['photo'];
}
} else {
$filename = $obj['photo'];
}
$realpath = $dir.$filename;
break;
}

View File

@ -254,8 +254,15 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
}
$realpath = '';
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) {
$filename = $obj['photo'];
//if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette'];
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
if ($obj['photo_vignette']) {
$filename = $obj['photo_vignette'];
} else {
$filename = $obj['photo'];
}
} else {
$filename = $obj['photo'];
}
$realpath = $dir.$filename;
break;
}

View File

@ -251,8 +251,15 @@ class pdf_aurore extends ModelePDFSupplierProposal
$realpath = '';
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) {
$filename = $obj['photo'];
//if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette'];
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
if ($obj['photo_vignette']) {
$filename = $obj['photo_vignette'];
} else {
$filename = $obj['photo'];
}
} else {
$filename = $obj['photo'];
}
$realpath = $dir.$filename;
break;
}