From ef803c7ce95c839f7f4e0c379b381fd077e5e56b Mon Sep 17 00:00:00 2001 From: jsatoh Date: Fri, 6 May 2011 07:19:59 +0000 Subject: [PATCH] 2011-05-06 Junichi Satoh * godmode/alerts/alert_list.list.php: Fixed filter parameters are not taken over with offset selection. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4310 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/godmode/alerts/alert_list.list.php | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) 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'),