mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
#8541 Added file customer_key
This commit is contained in:
parent
a94f729237
commit
55e847a5c9
@ -75,7 +75,10 @@ if ($update_settings) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update the license file.
|
// Update the license file.
|
||||||
file_put_contents($config["remote_config"] . '/' . LICENSE_FILE, $_POST['keys']['customer_key']);
|
$result = file_put_contents($config['remote_config'].'/'.LICENSE_FILE, $_POST['keys']['customer_key']);
|
||||||
|
if ($result === false) {
|
||||||
|
ui_print_error_message(__('Failed to Update license file'));
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_success_message(__('License updated'));
|
ui_print_success_message(__('License updated'));
|
||||||
}
|
}
|
||||||
|
@ -14904,6 +14904,31 @@ function api_set_metaconsole_synch($keys)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function api_set_metaconsole_license_file($key)
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
if (defined('METACONSOLE')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($key) === true) {
|
||||||
|
returnError('Key cannot be empty.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the license file.
|
||||||
|
$result = file_put_contents($config['remote_config'].'/'.LICENSE_FILE, $key);
|
||||||
|
if ($result === false) {
|
||||||
|
returnError('update-license', 'Failed to Update license file.');
|
||||||
|
} else {
|
||||||
|
returnData('string', ['type' => 'string', 'data' => true]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function api_set_new_cluster($thrash1, $thrash2, $other, $thrash3)
|
function api_set_new_cluster($thrash1, $thrash2, $other, $thrash3)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user