diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index f564b6599d..e026081d6d 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -581,7 +581,30 @@ class SnmpConsole extends HTML $prea = array_keys($user_groups); $ids = join(',', $prea); - $user_in_group_wo_agents = db_get_value_sql('select count(DISTINCT(id_usuario)) from tusuario_perfil where id_usuario ="'.$config['id_user'].'" and id_perfil = 1 and id_grupo in (select id_grupo from tgrupo where id_grupo in ('.$ids.') and id_grupo not in (select id_grupo from tagente))'); + $sql_count = sprintf( + 'SELECT + count(DISTINCT(id_usuario)) + FROM + tusuario_perfil + WHERE + id_usuario = "%s" + AND id_grupo IN ( + SELECT + id_grupo + FROM + tgrupo + WHERE + id_grupo IN (%s) + AND id_grupo NOT IN ( + SELECT + id_grupo + FROM + tagente))', + $config['id_user'], + $ids + ); + + $user_in_group_wo_agents = db_get_value_sql($sql_count); if ($user_in_group_wo_agents == 0) { $rows = db_get_all_rows_filter( 'tagente', @@ -778,7 +801,7 @@ class SnmpConsole extends HTML // SNMP Agent. $agent = agents_get_agent_with_ip($tmp->source); if ($agent === false) { - $tmp->snmp_agent .= 'source.'" title="'.__('Create agent').'">'.$tmp->source.''; + $tmp->snmp_agent .= ''.$tmp->source.''; } else { $tmp->snmp_agent .= '