From df6d0655d13a3e2ba42318aa415bf3eac6c0787f Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Tue, 29 Aug 2023 13:30:05 +0200 Subject: [PATCH 1/2] #11947 Fix agentaccess evaluate --- pandora_console/include/class/ConsoleSupervisor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index f6d3767708..4caab01ee0 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -702,8 +702,8 @@ class ConsoleSupervisor $total_agents = db_get_value('count(*)', 'tagente'); - if ($total_agents >= 200) { - if ($config['agentaccess'] !== 0) { + if ($total_agents >= 1) { + if ((int) $config['agentaccess'] !== 0) { db_process_sql_update('tconfig', ['value' => 0], ['token' => 'agentaccess']); $this->notify( [ From 793c953e0713c75a75e5538f5bb80cec43de8d16 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Wed, 6 Sep 2023 10:38:09 +0200 Subject: [PATCH 2/2] #11947 Fix notification --- pandora_console/include/class/ConsoleSupervisor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 4caab01ee0..7e5e5de1bc 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -702,7 +702,7 @@ class ConsoleSupervisor $total_agents = db_get_value('count(*)', 'tagente'); - if ($total_agents >= 1) { + if ($total_agents >= 200) { if ((int) $config['agentaccess'] !== 0) { db_process_sql_update('tconfig', ['value' => 0], ['token' => 'agentaccess']); $this->notify(