From 9b9b5adf660d47a07191d342e6066046acc3bfe9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Dec 2017 13:01:45 +0100 Subject: [PATCH] Fix must be compatible with old and new storage location --- htdocs/product/document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 814f708a99e..a3ccbead70a 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -76,8 +76,8 @@ if ($id > 0 || ! empty($ref)) if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs { - if (! empty($conf->product->enabled)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2),1,1).'/'.substr(substr("000".$object->id, -2),0,1).'/'.$object->id."/photos"; - else $upload_dir = $conf->service->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2),1,1).'/'.substr(substr("000".$object->id, -2),0,1).'/'.$object->id."/photos"; + if (! empty($conf->product->enabled)) $upload_dirold = $conf->product->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2),1,1).'/'.substr(substr("000".$object->id, -2),0,1).'/'.$object->id."/photos"; + else $upload_dirold = $conf->service->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2),1,1).'/'.substr(substr("000".$object->id, -2),0,1).'/'.$object->id."/photos"; } } $modulepart='produit';