mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-26 23:35:02 +02:00
Merge branch 'ent-12498-widget-top-n-of-agent-modules-no-muestra-resultados-de-todos-los-agentes' into 'develop'
Ent 12498 Widget TOP N of Agent Modules no muestra resultados de TODOS los agentes See merge request artica/pandorafms!6695
This commit is contained in:
commit
2e0d732eb9
@ -420,6 +420,20 @@ class TopNWidget extends Widget
|
|||||||
// Prevent double safe input in agents_get_group_agents function.
|
// Prevent double safe input in agents_get_group_agents function.
|
||||||
$agentRegex = io_safe_output($agentRegex);
|
$agentRegex = io_safe_output($agentRegex);
|
||||||
|
|
||||||
|
// Validate regex.
|
||||||
|
if (@preg_match('/'.$agentRegex.'/', '') === false
|
||||||
|
|| @preg_match('/'.$this->values['module'].'/', '') === false
|
||||||
|
) {
|
||||||
|
$output .= '<div class="container-center">';
|
||||||
|
$output .= \ui_print_info_message(
|
||||||
|
__('Invalid regex'),
|
||||||
|
'',
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$output .= '</div>';
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
// This function check ACL.
|
// This function check ACL.
|
||||||
$agents = @agents_get_group_agents(0, ['aliasRegex' => $agentRegex]);
|
$agents = @agents_get_group_agents(0, ['aliasRegex' => $agentRegex]);
|
||||||
$agentsId = \array_keys($agents);
|
$agentsId = \array_keys($agents);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user