#9873 Fixed images

This commit is contained in:
Daniel Maya 2022-11-29 16:45:44 +01:00
parent d39c014e0f
commit 57bd23f94c
1 changed files with 6 additions and 1 deletions

View File

@ -2296,6 +2296,7 @@ class Item extends CachedModel
false
);
$aux_images = $all_images;
foreach ($all_images as $image_file) {
$image_file = substr($image_file, 0, (strlen($image_file) - 4));
@ -2311,7 +2312,11 @@ class Item extends CachedModel
continue;
}
$result[$image_file] = $image_file;
// Check the 4 images.
$array_images = preg_grep('/'.$image_file.'(_ok|_bad|_warning)*\./', $aux_images);
if (count($array_images) >= 4) {
$result[$image_file] = $image_file;
}
}
}