diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php
index cfd987fc58..189507772b 100644
--- a/pandora_console/godmode/alerts/alert_list.list.php
+++ b/pandora_console/godmode/alerts/alert_list.list.php
@@ -102,16 +102,8 @@ if ($groups_user === false) {
$groups_id = implode(',', array_keys($groups_user));
$form_filter .= "
";
-switch ($config["dbtype"]) {
- case "mysql":
- case "postgresql":
- $temp = db_get_all_rows_sql("SELECT id, name FROM talert_actions WHERE id_group IN ($groups_id);");
- break;
- case "oracle":
- $temp = db_get_all_rows_sql("SELECT id, name FROM talert_actions WHERE id_group IN ($groups_id)");
- break;
-}
+$temp = db_get_all_rows_sql("SELECT id, name FROM talert_actions WHERE id_group IN ($groups_id);");
$arrayActions = array();
if (is_array($temp)) {
foreach ($temp as $actionElement) {
@@ -186,23 +178,10 @@ if ($searchFlag) {
field3_recovery LIKE '%" . trim($fieldContent) . "%')";
if (strlen(trim($moduleName)) > 0)
$where .= " AND id_agent_module IN (SELECT id_agente_modulo FROM tagente_modulo WHERE nombre LIKE '%" . trim($moduleName) . "%')";
- //if ($agentID != -1)
- //$where .= " AND id_agent_module IN (SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente = " . $agentID . ")";
if (strlen(trim($agentName)) > 0) {
-
- switch ($config["dbtype"]) {
- case "mysql":
- case "postgresql":
- $where .= " AND id_agent_module IN (SELECT t2.id_agente_modulo
- FROM tagente t1 INNER JOIN tagente_modulo t2 ON t1.id_agente = t2.id_agente
- WHERE t1.alias LIKE '" . trim($agentName) . "')";
- break;
- case "oracle":
- $where .= " AND id_agent_module IN (SELECT t2.id_agente_modulo
- FROM tagente t1 INNER JOIN tagente_modulo t2 ON t1.id_agente = t2.id_agente
- WHERE t1.alias LIKE '" . trim($agentName) . "')";
- break;
- }
+ $where .= " AND id_agent_module IN (SELECT t2.id_agente_modulo
+ FROM tagente t1 INNER JOIN tagente_modulo t2 ON t1.id_agente = t2.id_agente
+ WHERE t1.alias LIKE '" . trim($agentName) . "')";
}
if ($actionID != -1 && $actionID != '')
$where .= " AND talert_template_modules.id IN (SELECT id_alert_template_module FROM talert_template_module_actions WHERE id_alert_action = " . $actionID . ")";
@@ -212,17 +191,7 @@ if ($searchFlag) {
$where .= " AND talert_template_modules.standby = " . $standby;
}
-switch ($config["dbtype"]) {
- case "mysql":
- case "postgresql":
- $id_agents = array_keys ($agents);
- break;
- case "oracle":
- $id_agents = false;
- break;
-}
-
-
+$id_agents = array_keys ($agents);
$total = agents_get_alerts_simple ($id_agents, false,
false, $where, false, false, false, true);
@@ -704,27 +673,32 @@ foreach ($simple_alerts as $alert) {
// To manage alert is necessary LW permissions in the agent group
if(check_acl_one_of_groups ($config['id_user'], $all_groups, "LW")) {
$data[4] .= ' ';
- $data[4] .= '';
-
+ $data[4] .= '';
+ }
}
if(check_acl_one_of_groups ($config['id_user'], $all_groups, "LM")) {