diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index b0cbc0cec5..38f36fe730 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -352,7 +352,10 @@ echo sprintf('
', $menuTypeClass); } // Button for feedback pandora. - if (enterprise_installed()) { + if (enterprise_installed() && ( (!isset($config['activate_feedback']) + || (isset($config['activate_feedback']) + && $config['activate_feedback'] === true )) ) + ) { $header_feedback = '
'; $header_feedback .= ''; $header_feedback .= ''; diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index f6e4aac358..79670bc02b 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -546,21 +546,23 @@ if ($access_console_node === true) { } } - $menu_godmode['links']['text'] = __('Links'); - $menu_godmode['links']['sec2'] = ''; - $menu_godmode['links']['id'] = 'god-links'; + /* + $menu_godmode['links']['text'] = __('Links'); + $menu_godmode['links']['sec2'] = ''; + $menu_godmode['links']['id'] = 'god-links'; - $sub = []; - $rows = db_get_all_rows_in_table('tlink', 'name'); - foreach ($rows as $row) { + $sub = []; + $rows = db_get_all_rows_in_table('tlink', 'name'); + foreach ($rows as $row) { // Audit //meter en extensiones. $sub[$row['link']]['text'] = $row['name']; $sub[$row['link']]['id'] = $row['name']; $sub[$row['link']]['type'] = 'direct'; $sub[$row['link']]['subtype'] = 'new_blank'; - } + } - $menu_godmode['links']['sub'] = $sub; + $menu_godmode['links']['sub'] = $sub; + */ } // Warp Manager. diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index ad7a40aa8b..ce0216ce64 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -429,6 +429,19 @@ $table->data[$i++][] = html_print_label_input_block( ) ); +$table->data[$i++][] = html_print_label_input_block( + __('Enable Feedback'), + html_print_checkbox_switch_extended( + 'activate_feedback', + 1, + $config['activate_feedback'], + false, + '', + '', + true + ) +); + $table->colspan[$i][] = 2; $table->data[$i++][] = html_print_label_input_block( __('Timezone setup'), diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index b94892e7c1..a990c96398 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -264,6 +264,10 @@ function config_update_config() $error_update[] = __('Enable Sflow'); } + if (config_update_value('activate_feedback', (bool) get_parameter('activate_feedback'), true) === false) { + $error_update[] = __('Enable Feedback'); + } + if (config_update_value('general_network_path', get_parameter('general_network_path'), true) === false) { $error_update[] = __('General network path'); } else { @@ -3330,6 +3334,10 @@ function config_process_config() config_update_value('autoupdate', 1); } + if (!isset($config['activate_feedback'])) { + config_update_value('activate_feedback', 1); + } + if (!isset($config['api_password'])) { config_update_value('api_password', ''); } diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 8b6d9f4749..fe381e0449 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -628,6 +628,27 @@ if ($favorite_menu !== false) { } +// Links. +$rows = db_get_all_rows_in_table('tlink', 'name'); +// $rows = []; +if (!empty($rows)) { + $menu_operation['links']['text'] = __('Links'); + $menu_operation['links']['sec2'] = ''; + $menu_operation['links']['id'] = 'god-links'; + + $sub = []; + foreach ($rows as $row) { + // Audit //meter en extensiones. + $sub[$row['link']]['text'] = $row['name']; + $sub[$row['link']]['id'] = $row['name']; + $sub[$row['link']]['type'] = 'direct'; + $sub[$row['link']]['subtype'] = 'new_blank'; + } + + $menu_operation['links']['sub'] = $sub; +} + + // Workspace. @@ -785,6 +806,8 @@ if ($access_console_node === true) { // ~ } } + + // Save operation menu array to use in operation/extensions.php view $operation_menu_array = $menu_operation;