From d21068e3683cc94378a485e2604f6c212a07c500 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Fri, 24 Jan 2020 13:52:09 +0100 Subject: [PATCH] fix to display pandora tab subtitle based on condition and display rebranding product name in case database connection failed --- pandora_console/include/functions.php | 6 ++++++ pandora_console/include/functions_ui.php | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 89c53802b4..418dc001be 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -3926,8 +3926,14 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined=false */ function get_product_name() { + global $config; + $stored_name = enterprise_hook('enterprise_get_product_name'); if (empty($stored_name) || $stored_name == ENTERPRISE_NOT_HOOK) { + if ($config['rb_product_name_alt']) { + return $config['rb_product_name_alt']; + } + return 'Pandora FMS'; } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 9bfb9eca55..3786b77001 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1691,8 +1691,10 @@ function ui_process_page_head($string, $bitfield) } } + $text_subtitle = isset($config['rb_product_name_alt']) ? '' : ' - '.__('the Flexible Monitoring System'); + $output .= "\n\t"; - $output .= ''.get_product_name().' - '.__('the Flexible Monitoring System').' + $output .= ''.get_product_name().$text_subtitle.'