From 08b393614abdd475d07d212c380f0257a0202b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Thu, 24 Feb 2022 14:55:47 +0100 Subject: [PATCH 1/2] Fixed missing char --- .../godmode/agentes/modificar_agente.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 0b9158fa9e..39fa81be8b 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -533,10 +533,10 @@ if ($search != '') { $search_sql .= ')'; } else { $search_sql = sprintf( - ' AND ( nombre - LIKE "%%%s%%" OR alias - LIKE "%%%s%%" OR comentarios LIKE "%%%s%%" - OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND description LIKE "%%%s%%")', + ' AND ( nombre + LIKE "%%%s%%" OR alias + LIKE "%%%s%%" OR comentarios LIKE "%%%s%%" + OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND description LIKE "%%%s%%"))', $search, $search, $search, @@ -586,9 +586,16 @@ $sql = sprintf( $user_groups_to_sql, $search_sql ); +hd('INICIO user_groups_to_sql', true); +hd($user_groups_to_sql, true); +hd('FINAL user_groups_to_sql', true); +hd('INICIO search_sql', true); +hd($search_sql, true); +hd('FINAL search_sql', true); +hd($sql, true); $total_agents = db_get_sql($sql); - +hd($total_agents, true); $sql = sprintf( 'SELECT * FROM tagente LEFT JOIN tagent_secondary_group tasg From 95e8a10fe1af3f8e2ce4665d8973826f81052d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Fri, 25 Feb 2022 08:31:14 +0100 Subject: [PATCH 2/2] Clean traces --- pandora_console/godmode/agentes/modificar_agente.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 39fa81be8b..9c63363df2 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -586,16 +586,9 @@ $sql = sprintf( $user_groups_to_sql, $search_sql ); -hd('INICIO user_groups_to_sql', true); -hd($user_groups_to_sql, true); -hd('FINAL user_groups_to_sql', true); -hd('INICIO search_sql', true); -hd($search_sql, true); -hd('FINAL search_sql', true); -hd($sql, true); $total_agents = db_get_sql($sql); -hd($total_agents, true); + $sql = sprintf( 'SELECT * FROM tagente LEFT JOIN tagent_secondary_group tasg