diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 6c4d0a8199..d0d4fd30da 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -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; +} ?> diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 87c8e9cb6a..4f78bdf79d 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -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');