[Rebranding] Added product name and copyright notice to setup

This commit is contained in:
fermin831 2018-05-09 11:49:12 +02:00
parent 220ea8d319
commit 614db8b523
2 changed files with 33 additions and 1 deletions

View File

@ -2811,4 +2811,32 @@ function validate_address($address){
}
return true;
}
/**
* Get the product name.
*
* @return string If the installation is open, it will be 'Pandora FMS'.
* If the product name stored is empty, it returns 'Pandora FMS' too.
*/
function get_product_name () {
$stored_name = enterprise_hook('enterprise_get_product_name');
if (empty($stored_name) || $stored_name == ENTERPRISE_NOT_HOOK) {
return "Pandora FMS";
}
return $stored_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.
*/
function get_copyright_notice () {
$stored_name = enterprise_hook('enterprise_get_copyright_notice');
if (empty($stored_name) || $stored_name == ENTERPRISE_NOT_HOOK) {
return "Ártica ST";
}
return $stored_name;
}
?>

View File

@ -249,7 +249,11 @@ function config_update_config () {
$error_update[] = __('Metaconsole agent cache');
if (!config_update_value ('log_collector', (bool)get_parameter('log_collector')))
$error_update[] = __('Activate Log Collector');
if (!config_update_value ('rb_product_name', (string)get_parameter('rb_product_name')))
$error_update[] = __('Product name');
if (!config_update_value ('rb_copyright_notice', (string)get_parameter('rb_copyright_notice')))
$error_update[] = __('Copyright notice');
$inventory_changes_blacklist = get_parameter('inventory_changes_blacklist', array());
if (!config_update_value ('inventory_changes_blacklist', implode(',',$inventory_changes_blacklist)))
$error_update[] = __('Inventory changes blacklist');