diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3262131063..0cb6f4a0c8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2011-05-06 Junichi Satoh + + * godmode/alerts/alert_list.list.php: Fixed filter parameters are not + taken over with offset selection. + 2011-05-05 Sergio Martin * godmode/agentes/configurar_agente.php diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index 938971b9ad..8654653df3 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -125,7 +125,7 @@ $total = 0; $where = ''; if ($searchFlag) { - if ($priority != -1 ) + if ($priority != -1 && $priority != '') $where .= " AND id_alert_template IN (SELECT id FROM talert_templates WHERE priority = " . $priority . ")"; if (strlen(trim($templateName)) > 0) $where .= " AND id_alert_template IN (SELECT id FROM talert_templates WHERE name LIKE '%" . trim($templateName) . "%')"; @@ -155,11 +155,11 @@ if ($searchFlag) { break; } } - if ($actionID != -1) + 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 . ")"; - if ($enabledisable != -1) + if ($enabledisable != -1 && $enabledisable != '') $where .= " AND talert_template_modules.disabled =" . $enabledisable; - if ($standby != -1) + if ($standby != -1 && $standby != '') $where .= " AND talert_template_modules.standby = " . $standby; } @@ -279,7 +279,7 @@ if ($id_agente) { ui_pagination ($total, 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&id_agente=' . $id_agente); } else { - ui_pagination ($total, 'index.php?sec=gagente&sec2=godmode/alerts/alert_list'); + ui_pagination ($total, 'index.php?sec=galertas&sec2=godmode/alerts/alert_list&search=1' . '&template_name=' . $templateName . '&agent_name=' . $agentName . '&module_name=' . $moduleName . '&action_id=' . $actionID . '&field_content=' . $fieldContent. '&priority=' . $priority . '&enabledisable=' . $enabledisable . '&standby=' . $standby); } $simple_alerts = agents_get_alerts_simple (array_keys ($agents), false, array ('offset' => (int) get_parameter ('offset'),