Bugfix sur l'affichage des photos
This commit is contained in:
parent
ffb9654b49
commit
b33a50e6ee
@ -891,19 +891,22 @@ class Product
|
|||||||
$pdir = get_exdir($this->id) . $this->id ."/photos/";
|
$pdir = get_exdir($this->id) . $this->id ."/photos/";
|
||||||
$dir = $sdir . '/'. $pdir;
|
$dir = $sdir . '/'. $pdir;
|
||||||
|
|
||||||
$handle=opendir($dir);
|
if ( file_exists($dir))
|
||||||
|
|
||||||
while (($file = readdir($handle))!==false)
|
|
||||||
{
|
{
|
||||||
if (is_file($dir.$file))
|
$handle=opendir($dir);
|
||||||
|
|
||||||
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
$photo = $file;
|
if (is_file($dir.$file))
|
||||||
|
{
|
||||||
|
$photo = $file;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen($photo))
|
if (strlen($photo))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$photo).'">';
|
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$photo).'">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user