Merge branch 'ent-3458-Metaconsola_filtro_eventos_por_nombre_agente_no_machea_nombres_con_espacios' into 'develop'

Fixed filter by name of agents in events when they contain spaces

See merge request 

Former-commit-id: 725ca1b5279d8074454ae8ed4b3af27f084e9594
This commit is contained in:
Alejandro Fraguas 2019-02-21 17:07:36 +01:00
commit a9eb3cf37b
1 changed files with 14 additions and 12 deletions
pandora_console/operation/events

View File

@ -1,16 +1,18 @@
<?php
/**
* Pandora FMS - http://pandorafms.com
* ==================================================
* Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
if (check_acl($id_user, 0, 'ER')) {
$groups = users_get_groups($id_user, 'ER');
} else if (check_acl($id_user, 0, 'EW')) {
@ -212,7 +214,7 @@ if ($meta) {
$id_agent = get_parameter('id_agent', 0);
if ($id_agent) {
$sql_post .= ' AND agent_name IN (SELECT nombre FROM tmetaconsole_agent WHERE
id_tagente ='.$id_agent." AND alias LIKE '".io_safe_input($text_agent)."')";
id_tagente ='.$id_agent." AND alias LIKE '".$text_agent."')";
$filter_resume['agent'] = $text_agent;
}
} else {