From 0c9d9ee100a198ae1ced22330c03855feb13672f Mon Sep 17 00:00:00 2001 From: jsatoh Date: Tue, 3 Aug 2010 02:53:07 +0000 Subject: [PATCH] 2010-08-03 Junichi Satoh * godmode/alerts/alert_list.list.php: Fixed a problem alert filtering by priority does not work. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3086 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/godmode/alerts/alert_list.list.php | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4a13867639..f043635bfc 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-08-03 Junichi Satoh + + * godmode/alerts/alert_list.list.php: Fixed a problem alert filtering + by priority does not work. + 2010-08-02 Ramon Novoa * include/pchart_graph.php, include/fgraph.php: Removed title from diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index 8cd561fd6f..8100ec3caf 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -104,7 +104,7 @@ $where = ''; if ($searchFlag) { if ($priority != -1 ) - $where .= " AND priority = " . $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) . "%')"; if (strlen(trim($fieldContent)) > 0) @@ -125,7 +125,7 @@ if ($searchFlag) { $where .= " AND id IN (SELECT id_alert_template_module FROM talert_template_module_actions WHERE id_alert_action = " . $actionID . ")"; } -$total = get_agent_alerts_simple (array_keys ($agents), array('priority' => $priority), +$total = get_agent_alerts_simple (array_keys ($agents), false, false, $where, false, false, false, true); if(empty($total)) $total = 0; @@ -220,7 +220,7 @@ switch ($sortField) { } pagination ($total, 'index.php?sec=gagente&sec2=godmode/alerts/alert_list'); -$simple_alerts = get_agent_alerts_simple (array_keys ($agents), array('priority' => $priority), +$simple_alerts = get_agent_alerts_simple (array_keys ($agents), false, array ('offset' => (int) get_parameter ('offset'), 'limit' => $config['block_size'], 'order' => $order), $where, false);