mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
fixed query errors
This commit is contained in:
parent
d39c014e0f
commit
b4079bd557
@ -375,11 +375,19 @@ class TopNWidget extends Widget
|
||||
);
|
||||
}
|
||||
|
||||
// Prevent double safe input in agents_get_group_agents function.
|
||||
$agentRegex = io_safe_output($agentRegex);
|
||||
|
||||
// This function check ACL.
|
||||
$agents = @agents_get_group_agents(0, ['aliasRegex' => $agentRegex]);
|
||||
$agentsId = \array_keys($agents);
|
||||
$agentsIdString = \implode(',', $agentsId);
|
||||
|
||||
// Prevent from error when performing IN clause with an empty string.
|
||||
if ($agentsIdString === '') {
|
||||
$agentsIdString = 'NULL';
|
||||
}
|
||||
|
||||
// Initialize variables.
|
||||
$date = \get_system_time();
|
||||
$datelimit = ($date - $period);
|
||||
|
Loading…
x
Reference in New Issue
Block a user