Added rebranding features

This commit is contained in:
José González 2021-07-16 13:17:25 +02:00
parent bf890c0d11
commit 784d9b0121
2 changed files with 18 additions and 2 deletions

View File

@ -4275,8 +4275,8 @@ function get_product_name()
/**
* Get the copyright notice.
*
* @return string If the installation is open, it will be 'Artica ST'.
* If the product name stored is empty, it returns 'Artica ST' too.
* @return string If the installation is open, it will be 'PandoraFMS.com'.
* If the product name stored is empty, it returns 'PandoraFMS.com' too.
*/
function get_copyright_notice()
{

View File

@ -1096,6 +1096,14 @@ function config_update_config()
$error_update[] = __('Custom support url');
}
if (!config_update_value('meta_rb_product_name', (string) get_parameter('meta_rb_product_name'))) {
$error_update[] = __('Custom product name');
}
if (!config_update_value('meta_rb_copyright_notice', (string) get_parameter('meta_rb_copyright_notice'))) {
$error_update[] = __('Custom copyright notice');
}
if (!config_update_value('legacy_vc', (int) get_parameter('legacy_vc'))) {
$error_update[] = __('Use the legacy Visual Console');
}
@ -2381,6 +2389,14 @@ function config_process_config()
config_update_value('meta_custom_support_url', 'https://support.pandorafms.com');
}
if (!isset($config['meta_rb_product_name'])) {
config_update_value('meta_rb_product_name', get_product_name());
}
if (!isset($config['meta_rb_copyright_notice'])) {
config_update_value('meta_rb_copyright_notice', get_copyright_notice());
}
if (!isset($config['meta_custom_logo_white_bg'])) {
config_update_value('pandora_logo_head_white_bg', 'pandora_logo_head_white_bg.png');
}