From 3a9b8d31bfd36deab126a3a6f9fb3f23c7ed8dae Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 12 Apr 2023 17:21:27 +0200 Subject: [PATCH] fix icons pandora_enterprise#10909 --- pandora_console/include/functions_groups.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 02d0f434bb..d2d77b241a 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -445,6 +445,15 @@ function groups_get_icon($id_group) } else { $icon = (string) db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group); + $extension = pathinfo($icon, PATHINFO_EXTENSION); + if (empty($extension) === true) { + $icon .= '.png'; + } + + if (empty($extension) === true || $extension === 'png') { + $icon = 'groups_small/'.$icon; + } + if (empty($icon) === true) { $icon = 'unknown@groups.svg'; }