fix icons pandora_enterprise#10909

This commit is contained in:
daniel 2023-04-12 17:21:27 +02:00
parent b186d51329
commit 3a9b8d31bf
1 changed files with 9 additions and 0 deletions

View File

@ -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';
}