From b963395d01c400d30bf573ebe7e27ee7e80444c8 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 11 Jan 2019 08:45:12 +0100 Subject: [PATCH 01/12] fixed errors Former-commit-id: 813a875e0f3d0dc3c1097ced987a5a45e8051046 --- pandora_console/include/functions_os.php | 15 ++++++++++++--- pandora_console/include/functions_ui.php | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_os.php b/pandora_console/include/functions_os.php index f9f7e407ec..a9c786074b 100755 --- a/pandora_console/include/functions_os.php +++ b/pandora_console/include/functions_os.php @@ -67,12 +67,21 @@ function os_get_name($id_os) { } -function os_get_os() { +function os_get_os($hash = false) { + $result = array(); $op_systems = db_get_all_rows_in_table('tconfig_os'); if (empty($op_systems)) $op_systems = array(); - - return $op_systems; + + if ($hash) { + foreach ($op_systems as $key => $value) { + $result[$value['id_os']] = $value['name']; + } + } else { + $result = $op_systems; + } + + return $result; } function os_get_icon($id_os) { diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 8f6f5a35d8..27a42acbb4 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1584,8 +1584,8 @@ $config['css']['dialog'] = "include/javascript/introjs.css"; //End load JQuery //////////////////////////////////////////////////////////////////// - include_once($config["homedir"] . '/include/graphs/functions_flot.php'); - $output .= include_javascript_dependencies_flot_graph(true); + include_once (__DIR__ . '/graphs/functions_flot.php'); + $output .= include_javascript_dependencies_flot_graph (true); $output .= '