#12721 free licence change 3

This commit is contained in:
Daniel Maya 2024-02-22 09:16:43 +01:00
parent 5dad6bfb4b
commit 5f0ed9f48c
3 changed files with 12 additions and 33 deletions

View File

@ -76,20 +76,6 @@ if ($update_settings) {
[db_escape_key_identifier('value') => $value],
[db_escape_key_identifier('key') => $key]
);
if ($value === OTHER_LICENSE) {
$exist = db_get_value('token', 'tconfig', 'token', 'expiry_date');
if ($exist === false) {
$expiry_date = date('Ymd', strtotime('+30 days'));
db_process_sql_insert(
'tconfig',
[
db_escape_key_identifier('value') => base64_encode($expiry_date),
db_escape_key_identifier('token') => 'expiry_date',
]
);
}
}
}
$customer_key = $_POST['keys']['customer_key'];

View File

@ -113,19 +113,18 @@ if ($license_data !== ENTERPRISE_NOT_HOOK) {
return;
}
if (rtrim($license_data['licensed_to']) === Manager::PANDORA_TRIAL_ISSUER) {
$product_name = get_product_name();
ui_print_info_message(
__(
'You cannot use update manager %s. This license is a trial license to test all %s features. Please update your license to unlock all %s features.',
$mode_str,
$product_name,
$product_name
)
);
return;
}
// if (rtrim($license_data['licensed_to']) === Manager::PANDORA_TRIAL_ISSUER) {
// $product_name = get_product_name();
// ui_print_info_message(
// __(
// 'You cannot use update manager %s. This license is a trial license to test all %s features. Please update your license to unlock all %s features.',
// $mode_str,
// $product_name,
// $product_name
// )
// );
// return;
// }
} else {
$license_data = [];
$license_data['count_enabled'] = db_get_value(

View File

@ -878,12 +878,6 @@ define(
// Pandora FMS Enterprise license.
define('LICENSE_FILE', 'customer_key');
// Pandora FMS license free.
define('OTHER_LICENSE', 'PANDORA-FREE');
// Total number of agents for free licence.
define('TOTAL_AGENTS_LICENSE', 50);
// Total number of modules for free licence.
define('TOTAL_MODULES_LICENSE', 600);
// Pandora HA database list.
define('PANDORA_HA_FILE', 'pandora_ha_hosts.conf');