Skip to content
Snippets Groups Projects
Commit 99c45080 authored by Ferran Marcet's avatar Ferran Marcet
Browse files

Fix: Bug in the new photo system

parent 50a6c133
No related branches found
No related tags found
No related merge requests found
......@@ -3170,9 +3170,12 @@ class Product extends CommonObject
function is_photo_available($sdir)
{
include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php';
global $conf;
$dir = $sdir;
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) $dir .= '/'. get_exdir($this->id,2) . $this->id ."/photos";
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) $dir .= '/'. get_exdir($this->id,2) . $this->id ."/photos/";
else $dir .= '/'.dol_sanitizeFileName($this->ref).'/';
$nbphoto=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment