From 7b5ef6a2422b2ec62222bf0bc7d6840b1189bd9c Mon Sep 17 00:00:00 2001 From: hkosaka Date: Mon, 21 Apr 2014 08:19:46 +0000 Subject: [PATCH] 2014-04-21 Hirofumi Kosaka * godmode/massive/massive_enable_disable_alerts.php, godmode/massive/massive_standby_alerts.php: Long agent/module name with multi-byte chars could be shown as 'null' on alert list at the massive alert enable/disable/standby operations screen (because LEFT() in SQL does not consider multi-byte chars, neither SUBSTR() for alternative). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9791 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 +++++++++ .../godmode/massive/massive_enable_disable_alerts.php | 2 +- .../godmode/massive/massive_standby_alerts.php | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 12c20c1b9b..b36a64ea7c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2014-04-21 Hirofumi Kosaka + + * godmode/massive/massive_enable_disable_alerts.php, + godmode/massive/massive_standby_alerts.php: Long agent/module + name with multi-byte chars could be shown as 'null' on alert + list at the massive alert enable/disable/standby operations + screen (because LEFT() in SQL does not consider multi-byte + chars, neither SUBSTR() for alternative). + 2014-04-19 Junichi Satoh * godmode/agentes/agent_manager.php, diff --git a/pandora_console/godmode/massive/massive_enable_disable_alerts.php b/pandora_console/godmode/massive/massive_enable_disable_alerts.php index 78d3d6c7b4..f1d2a0e976 100644 --- a/pandora_console/godmode/massive/massive_enable_disable_alerts.php +++ b/pandora_console/godmode/massive/massive_enable_disable_alerts.php @@ -50,7 +50,7 @@ if (is_ajax ()) { $agents_alerts = alerts_get_agents_with_alert_template ($id_alert_templates, false, array('order' => 'tagente.nombre, talert_template_modules.disabled', 'talert_template_modules.disabled' => $disabled), - array ('LEFT(CONCAT(LEFT(tagente.nombre,40), " - ", tagente_modulo.nombre), 85) as agent_agentmodule_name', + array ('CONCAT(tagente.nombre, " - ", tagente_modulo.nombre) as agent_agentmodule_name', 'talert_template_modules.id as template_module_id'), $id_agents); echo json_encode (index_array ($agents_alerts, 'template_module_id', 'agent_agentmodule_name')); diff --git a/pandora_console/godmode/massive/massive_standby_alerts.php b/pandora_console/godmode/massive/massive_standby_alerts.php index 9a229a5593..1c5e069e7e 100644 --- a/pandora_console/godmode/massive/massive_standby_alerts.php +++ b/pandora_console/godmode/massive/massive_standby_alerts.php @@ -50,7 +50,7 @@ if (is_ajax ()) { $agents_alerts = alerts_get_agents_with_alert_template ($id_alert_templates, false, array('order' => 'tagente.nombre, talert_template_modules.standby', 'talert_template_modules.standby' => $standby), - array ('LEFT(CONCAT(LEFT(tagente.nombre,40), " - ", tagente_modulo.nombre), 85) as agent_agentmodule_name', + array ('CONCAT(tagente.nombre, " - ", tagente_modulo.nombre) as agent_agentmodule_name', 'talert_template_modules.id as template_module_id'), $id_agents); echo json_encode (index_array ($agents_alerts, 'template_module_id', 'agent_agentmodule_name'));