diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c13ae4f62c..7da2338c67 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,4 +1,12 @@ -2011-08-11 Sancho Lerena +2011-08-10 Miguel de Dios + + * include/functions_menu.php, operation/menu.php, godmode/menu.php: fixed + when set a icon in a enterprise extension for the entry in menu. And added + the feature to set a default icon when the icon not exists. + + Fixes: #3388452 + +2011-08-10 Sancho Lerena * include/styles/pandora.css: Removed black line in header. diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 3bf4f1294e..e7d61de7e0 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -256,6 +256,8 @@ if (check_acl ($config['id_user'], 0, "PM")) { $menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon']; $menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'gextensions'; $menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["extension"] = true; + $menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["enterprise"] = $extension['enterprise']; + $menu[$extmenu['fatherId']]['hasExtensions'] = true; } } diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index b17ffb90d1..6e4a5cd138 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -144,9 +144,26 @@ function menu_print_menu (&$menu) { else $secExtensionBool = false; if ($secExtensionBool) { - $imageIcon = 'images/extensions.png'; - if (strlen($sub["icon"]) > 0) - $imageIcon ='extensions/'.$sub["icon"]; + $imageIconDefault = 'images/extensions.png'; + if (strlen($sub["icon"]) > 0) { + $icon_enterprise = false; + if (isset($sub['enterprise'])) { + $icon_enterprise = (bool)$sub['enterprise']; + } + + if ($icon_enterprise) { + $imageIcon ='enterprise/extensions/'.$sub["icon"]; + } + else { + $imageIcon ='extensions/'.$sub["icon"]; + } + + if (!file_exists(realpath($imageIcon))) + $imageIcon = $imageIconDefault; + } + else { + $imageIcon = $imageIconDefault; + } $submenu_output .= '
 
'; } diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 0ed00aba2a..bad0f6af12 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -295,6 +295,7 @@ if (check_acl ($config['id_user'], 0, "AR")) { $menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["icon"] = $operationModeMenu['icon']; $menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["sec"] = 'extensions'; $menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["extension"] = true; + $menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["extension"] = $extension['enterprise']; $menu[$operationModeMenu['fatherId']]['hasExtensions'] = true; } }