diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php
index e92470e810..17a3043c56 100644
--- a/pandora_console/operation/agentes/ver_agente.php
+++ b/pandora_console/operation/agentes/ver_agente.php
@@ -469,17 +469,17 @@ if (is_ajax ()) {
echo ''.__('Last contact').': '.human_time_comparation($agent['ultimo_contacto']).'
';
echo ''.__('Last remote contact').': '.human_time_comparation($agent['ultimo_contacto_remoto']).'
';
- # Fix : Only show agents with module with tags of user profile
- $_user_tags = tags_get_user_tags($config['id_user'], 'RR');
+ # Fix : Only show agents with module with tags of user profile
+ $_user_tags = tags_get_user_tags($config['id_user'], 'RR');
+
+ $_sql_post = '';
+ if (is_array($_user_tags) && !empty($_user_tags)) {
- $_sql_post = '';
- if ($_user_tags !== false) {
-
- $_tags = implode(',', array_keys($_user_tags));
-
- $_sql_post .= ' AND tagente_modulo.id_agente_modulo IN (SELECT a.id_agente_modulo FROM tagente_modulo a, ttag_module b WHERE a.id_agente_modulo=b.id_agente_modulo AND b.id_tag IN (' . $_tags . ')) ';
-
- }
+ $_tags = implode(',', array_keys($_user_tags));
+
+ $_sql_post .= ' AND tagente_modulo.id_agente_modulo IN (SELECT a.id_agente_modulo FROM tagente_modulo a, ttag_module b WHERE a.id_agente_modulo=b.id_agente_modulo AND b.id_tag IN (' . $_tags . ')) ';
+
+ }
$sql = sprintf ('SELECT tagente_modulo.descripcion,
tagente_modulo.nombre
@@ -906,21 +906,21 @@ foreach ($config['extensions'] as $extension) {
}
}
-
- //RHEV extension is only available for RHEV Virtual Machines
- if ($extension['extension_ope_tab']['id'] === "rhev_manager") {
- //Get id for remote field "rhev_type"
- $id_remote_field = db_get_value("id_field", "tagent_custom_fields", "name", "rhev_type");
-
- //Get rhev type for this agent
- $rhev_type = db_get_value_filter ("description", "tagent_custom_data", array ("id_field" => $id_remote_field, "id_agent" => $agent['id_agente']));
-
- //Check if rhev type is a vm
- if ($rhev_type != "vm") {
- continue;
- }
- }
-
+
+ //RHEV extension is only available for RHEV Virtual Machines
+ if ($extension['extension_ope_tab']['id'] === "rhev_manager") {
+ //Get id for remote field "rhev_type"
+ $id_remote_field = db_get_value("id_field", "tagent_custom_fields", "name", "rhev_type");
+
+ //Get rhev type for this agent
+ $rhev_type = db_get_value_filter ("description", "tagent_custom_data", array ("id_field" => $id_remote_field, "id_agent" => $agent['id_agente']));
+
+ //Check if rhev type is a vm
+ if ($rhev_type != "vm") {
+ continue;
+ }
+ }
+
$image = $extension['extension_ope_tab']['icon'];
$name = $extension['extension_ope_tab']['name'];