diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index f9b6632c23..8ad895ff35 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -328,8 +328,6 @@ if (is_array ($config['extensions'])) { $sub2 = array (); foreach ($config['extensions'] as $extension) { - // html_debug($extension); - //If no godmode_menu is a operation extension if ($extension['godmode_menu'] == '') { continue; diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index e8955d2c81..27f2bf52fc 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -147,7 +147,7 @@ function events_get_events_grouped($sql_post, $offset = 0, db_process_sql ('SET group_concat_max_len = 9999999'); if ($total) { $sql = "SELECT COUNT(*) FROM (SELECT * - FROM $table te LEFT JOIN tagent_secondary_group tasg ON te.id_grupo = tasg.id_group + FROM $table te LEFT JOIN tagent_secondary_group tasg ON te.id_agente = tasg.id_agent WHERE 1=1 " . $sql_post . " GROUP BY estado, evento, id_agente, id_agentmodule" . $groupby_extra . ") AS t"; } @@ -163,7 +163,7 @@ function events_get_events_grouped($sql_post, $offset = 0, (SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity, (SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp, (SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = te.id_agentmodule) AS module_name - FROM $table te LEFT JOIN tagent_secondary_group tasg ON te.id_grupo = tasg.id_group + FROM $table te LEFT JOIN tagent_secondary_group tasg ON te.id_agente = tasg.id_agent WHERE 1=1 " . $sql_post . " GROUP BY estado, evento, id_agente, id_agentmodule" . $groupby_extra . " ORDER BY "; @@ -3458,7 +3458,7 @@ function events_get_events_grouped_by_agent($sql_post, $offset = 0, } else { $sql = "select id_agente, count(*) as total$fields_extra from $table te LEFT JOIN tagent_secondary_group tasg - ON te.id_grupo = tasg.id_group + ON te.id_agente = tasg.id_agent WHERE id_agente > 0 $sql_post GROUP BY id_agente$groupby_extra ORDER BY id_agente LIMIT $offset,$pagination"; } diff --git a/pandora_console/mobile/operation/agents.php b/pandora_console/mobile/operation/agents.php index 36dc2ef385..2a45208132 100644 --- a/pandora_console/mobile/operation/agents.php +++ b/pandora_console/mobile/operation/agents.php @@ -352,8 +352,6 @@ class Agents { '' . reporting_tiny_stats($agent, true, 'agent', ' ') . ' '; $last_time = time_w_fixed_tz($agent["ultimo_contacto"]); - html_debug(date('r', $last_time), true); - html_debug(get_current_utc_offset(), true); $now = get_system_time(); $diferencia = $now - $last_time; $time = ui_print_timestamp ($last_time, true, array('style' => 'font-size: 12px; margin-left: 20px;', 'units' => 'tiny')); diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php index 4271542d25..5fbb42881c 100755 --- a/pandora_console/operation/events/events.build_query.php +++ b/pandora_console/operation/events/events.build_query.php @@ -43,11 +43,11 @@ if ($id_group > 0) { else { $childrens_ids = array_keys($groups); } - //Group selection if ($id_group > 0 && in_array ($id_group, array_keys ($groups))) { if ($propagate) { - $sql_post = " AND id_grupo IN (" . implode(',', $childrens_ids) . ")"; + $childrens_str = implode(',', $childrens_ids); + $sql_post = " AND (id_grupo IN ($childrens_str) OR id_group IN ($childrens_str))"; } else { //If a group is selected and it's in the groups allowed