Merge branch 'ent-6237-10560-fallo-filtro-de-agentes-en-politicas-en-metaconsola' into 'develop'

add condition

See merge request artica/pandorafms!3459
This commit is contained in:
Daniel Rodriguez 2020-09-22 12:15:05 +02:00
commit a38570c698
1 changed files with 10 additions and 1 deletions

View File

@ -135,7 +135,7 @@ if (is_ajax()) {
} }
if ($search != '') { if ($search != '') {
$filter['string'] = $search; $filter['aliasRegex'] = $search;
} }
if ($status_agents != AGENT_STATUS_ALL) { if ($status_agents != AGENT_STATUS_ALL) {
@ -170,6 +170,15 @@ if (is_ajax()) {
$force_serialized $force_serialized
); );
$agents_aux = [];
foreach ($agents as $key => $value) {
if (preg_match('/'.$search.'/', io_safe_output($value))) {
$agents_aux[$key] = $value;
}
}
$agents = $agents_aux;
$agents_disabled = []; $agents_disabled = [];
// Add keys prefix. // Add keys prefix.
if ($keys_prefix !== '') { if ($keys_prefix !== '') {