Merge pull request #18016 from fappels/13_fix_klaas
FIX #17919 pictures in docs.
This commit is contained in:
commit
781df5a8a8
@ -241,7 +241,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$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 {
|
||||||
$pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default
|
$pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product'); // default
|
||||||
$pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative
|
$pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -237,7 +237,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
|||||||
$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 {
|
||||||
$pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default
|
$pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product'); // default
|
||||||
$pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative
|
$pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -189,7 +189,6 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
{
|
{
|
||||||
if (empty($object->lines[$i]->fk_product)) continue;
|
if (empty($object->lines[$i]->fk_product)) continue;
|
||||||
|
|
||||||
$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 (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO))
|
||||||
@ -197,7 +196,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
$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 {
|
||||||
$pdir = get_exdir(0, 2, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/';
|
$pdir = get_exdir(0, 0, 0, 0, $objphoto, 'product');
|
||||||
$dir = $conf->product->dir_output.'/'.$pdir;
|
$dir = $conf->product->dir_output.'/'.$pdir;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -609,7 +608,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
$posYAfterDescription = $pdf->GetY();
|
$posYAfterDescription = $pdf->GetY();
|
||||||
}
|
}
|
||||||
|
|
||||||
$nexY = $pdf->GetY();
|
$nexY = max($pdf->GetY(), $posYAfterImage);
|
||||||
$pageposafter = $pdf->getPage();
|
$pageposafter = $pdf->getPage();
|
||||||
|
|
||||||
$pdf->setPage($pageposbefore);
|
$pdf->setPage($pageposbefore);
|
||||||
|
|||||||
@ -252,7 +252,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$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 {
|
||||||
$pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default
|
$pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product'); // default
|
||||||
$pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative
|
$pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -126,7 +126,7 @@ class pdf_squille extends ModelePdfReception
|
|||||||
|
|
||||||
// Loop on each lines to detect if there is at least one image to show
|
// Loop on each lines to detect if there is at least one image to show
|
||||||
$realpatharray = array();
|
$realpatharray = array();
|
||||||
if (!empty($conf->global->MAIN_GENERATE_SHIPMENT_WITH_PICTURE))
|
if (!empty($conf->global->MAIN_GENERATE_RECEPTION_WITH_PICTURE))
|
||||||
{
|
{
|
||||||
$objphoto = new Product($this->db);
|
$objphoto = new Product($this->db);
|
||||||
|
|
||||||
@ -137,8 +137,14 @@ 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))
|
||||||
|
{
|
||||||
$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 {
|
||||||
|
$pdir = get_exdir(0, 2, 0, 0, $objphoto, 'product');
|
||||||
|
$dir = $conf->product->dir_output.'/'.$pdir;
|
||||||
|
}
|
||||||
|
|
||||||
$realpath = '';
|
$realpath = '';
|
||||||
|
|
||||||
@ -423,7 +429,7 @@ class pdf_squille extends ModelePdfReception
|
|||||||
}
|
}
|
||||||
$posYAfterDescription = $pdf->GetY();
|
$posYAfterDescription = $pdf->GetY();
|
||||||
|
|
||||||
$nexY = $pdf->GetY();
|
$nexY = max($pdf->GetY(), $posYAfterImage);
|
||||||
$pageposafter = $pdf->getPage();
|
$pageposafter = $pdf->getPage();
|
||||||
|
|
||||||
$pdf->setPage($pageposbefore);
|
$pdf->setPage($pageposbefore);
|
||||||
|
|||||||
@ -241,7 +241,7 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
|||||||
$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 {
|
||||||
$pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default
|
$pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product'); // default
|
||||||
$pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative
|
$pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -252,7 +252,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
|
|||||||
$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 {
|
||||||
$pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default
|
$pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product'); // default
|
||||||
$pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative
|
$pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user