Merge branch '13.0' of github.com:Dolibarr/dolibarr into 13.0
This commit is contained in:
commit
e62c6be54c
@ -218,12 +218,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
$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 (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
|
||||||
{
|
$pdir = get_exdir($objphoto->id, 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($objphoto->id, 0, 0, 0, $objphoto, 'product');
|
||||||
$dir = $conf->product->dir_output.'/'.$pdir;
|
$dir = $conf->product->dir_output.'/'.$pdir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -233,15 +233,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$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 (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
|
||||||
{
|
$pdir = get_exdir($objphoto->id, 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($objphoto->id, 0, 0, 0, $objphoto, 'product');
|
||||||
$dir = $conf->product->dir_output.'/'.$pdir;
|
$dir = $conf->product->dir_output.'/'.$pdir;
|
||||||
}
|
}
|
||||||
|
|
||||||
$realpath = '';
|
$realpath = '';
|
||||||
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj)
|
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user