fix to display pandora tab subtitle based on condition and display rebranding product name in case database connection failed

This commit is contained in:
alejandro-campos 2020-01-24 13:52:09 +01:00
parent ea3a317a1b
commit d21068e368
2 changed files with 9 additions and 1 deletions

View File

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

View File

@ -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 .= '<title>'.get_product_name().' - '.__('the Flexible Monitoring System').'</title>
$output .= '<title>'.get_product_name().$text_subtitle.'</title>
<meta http-equiv="expires" content="never" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />