Merge branch 'ent-9873-14572-imagenes-personalizadas-en-elementos-servicios-de-consola-visual-desaparecen' into 'develop'

Ent 9873 14572 imagenes personalizadas en elementos servicios de consola visual desaparecen

See merge request artica/pandorafms!5301
This commit is contained in:
Rafael Ameijeiras 2022-12-12 08:10:10 +00:00
commit dab898aaa0
1 changed files with 6 additions and 1 deletions

View File

@ -2296,6 +2296,7 @@ class Item extends CachedModel
false false
); );
$aux_images = $all_images;
foreach ($all_images as $image_file) { foreach ($all_images as $image_file) {
$image_file = substr($image_file, 0, (strlen($image_file) - 4)); $image_file = substr($image_file, 0, (strlen($image_file) - 4));
@ -2311,7 +2312,11 @@ class Item extends CachedModel
continue; 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;
}
} }
} }