Skip to content

Commit

Permalink
Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 31, 2017
2 parents 911d583 + b642a8f commit 93b5801
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/categories/class/categorie.class.php
Expand Up @@ -1489,14 +1489,14 @@ function liste_photos($dir,$nbmax=0)
{
while (($file = readdir($handle)) !== false)
{
if (dol_is_file($dir.$file) && preg_match('/(\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$dir.$file))
if (dol_is_file($dir.$file) && preg_match('/(\.jpeg|\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$dir.$file))
{
$nbphoto++;
$photo = $file;

// On determine nom du fichier vignette
$photo_vignette='';
if (preg_match('/(\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$photo,$regs))
if (preg_match('/(\.jpeg|\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$photo,$regs))
{
$photo_vignette=preg_replace('/'.$regs[0].'/i','',$photo).'_small'.$regs[0];
}
Expand Down Expand Up @@ -1539,7 +1539,7 @@ function delete_photo($file)
dol_delete_file($file,1);

// Si elle existe, on efface la vignette
if (preg_match('/(\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$filename,$regs))
if (preg_match('/(\.jpeg|\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$filename,$regs))
{
$photo_vignette=preg_replace('/'.$regs[0].'/i','',$filename).'_small'.$regs[0];
if (file_exists($dirthumb.$photo_vignette))
Expand Down

0 comments on commit 93b5801

Please sign in to comment.