mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
#12721 free licence change
This commit is contained in:
parent
3a509b9415
commit
75964a0406
@ -68,7 +68,7 @@ if ($renew_license_result !== null) {
|
||||
}
|
||||
|
||||
if ($update_settings) {
|
||||
if (!is_metaconsole()) {
|
||||
if (is_metaconsole() === false) {
|
||||
// Node.
|
||||
foreach ($_POST['keys'] as $key => $value) {
|
||||
db_process_sql_update(
|
||||
@ -76,6 +76,20 @@ if ($update_settings) {
|
||||
[db_escape_key_identifier('value') => $value],
|
||||
[db_escape_key_identifier('key') => $key]
|
||||
);
|
||||
|
||||
if ($value === LICENSE_FREE) {
|
||||
$exist = db_get_value('token', 'tconfig', 'token', 'expiry_date');
|
||||
if ($exist === false) {
|
||||
$expiry_date = date('Ymd', strtotime(date('Ymd').'+ 1 month'));
|
||||
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'];
|
||||
|
@ -877,6 +877,12 @@ define(
|
||||
|
||||
// Pandora FMS Enterprise license.
|
||||
define('LICENSE_FILE', 'customer_key');
|
||||
// Pandora FMS license free.
|
||||
define('LICENSE_FREE', 'PANDORA-FREE');
|
||||
// Total number of agents for free licence.
|
||||
define('TOTAL_AGENTS_FREE', 50);
|
||||
// Total number of modules for free licence.
|
||||
define('TOTAL_MODULES_FREE', 600);
|
||||
// Pandora HA database list.
|
||||
define('PANDORA_HA_FILE', 'pandora_ha_hosts.conf');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user