Fix: missing images files filter

This commit is contained in:
Regis Houssin 2012-07-03 21:07:54 +02:00
parent 1c97934f6d
commit 454aa69697

View File

@ -2750,7 +2750,7 @@ class Product extends CommonObject
while (($file = readdir($handle)) != false) while (($file = readdir($handle)) != false)
{ {
if (! utf8_check($file)) $file=utf8_encode($file); // readdir returns ISO if (! utf8_check($file)) $file=utf8_encode($file); // readdir returns ISO
if (dol_is_file($dir.$file)) if (dol_is_file($dir.$file) && preg_match('/(\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i', $dir.$file))
{ {
$nbphoto++; $nbphoto++;