Merge branch 'fix-disable-enable-agent' into 'develop'

Fixed the problem that agents cannot be enabled/disabled with open version.

See merge request artica/pandorafms!3191
This commit is contained in:
Daniel Rodriguez 2020-06-02 09:54:40 +02:00
commit 2e79394288
1 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ if ($enable_agent) {
enterprise_include_once('include/functions_agents.php');
$values = ['disabled' => 0];
enterprise_hook('agent_update_from_cache', [$enable_agent, $values, $server_name]);
config_agents_update_config_token($enable_agent, 'standby', 0);
enterprise_hook('config_agents_update_config_token', [$enable_agent, 'standby', 0]);
db_pandora_audit('Agent management', 'Enable '.$alias);
} else {
db_pandora_audit('Agent management', 'Fail to enable '.$alias);
@ -144,7 +144,7 @@ if ($disable_agent) {
enterprise_include_once('include/functions_agents.php');
$values = ['disabled' => 1];
enterprise_hook('agent_update_from_cache', [$disable_agent, $values, $server_name]);
config_agents_update_config_token($disable_agent, 'standby', 1);
enterprise_hook('config_agents_update_config_token', [$disable_agent, 'standby', 1]);
db_pandora_audit('Agent management', 'Disable '.$alias);
} else {