From 35162716742ffc2449cc5a0e41db566d617672c7 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 16 Oct 2013 12:00:58 +0000 Subject: [PATCH] 2013-10-16 Miguel de Dios * godmode/agentes/configurar_agente.php, include/functions_network_components.php, include/functions_alerts.php: fixed the name of items to duplicate, now they have a html entities for whitespaces. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8926 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/godmode/agentes/configurar_agente.php | 5 +++-- pandora_console/include/functions_alerts.php | 2 +- pandora_console/include/functions_network_components.php | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e5cc4a10bb..8b51ea148e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-10-16 Miguel de Dios + + * godmode/agentes/configurar_agente.php, + include/functions_network_components.php, + include/functions_alerts.php: fixed the name of items to duplicate, + now they have a html entities for whitespaces. + 2013-10-16 Sergio Martin * include/javascript/jquery.pandora.js diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index c45e234f2b..c1b03058f0 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1257,7 +1257,7 @@ if (!empty($duplicate_module)) { // DUPLICATE agent module ! $id_duplicate_module = $duplicate_module; $original_name = modules_get_agentmodule_name($id_duplicate_module); - $copy_name = sprintf(__('copy of %s'), $original_name); + $copy_name = io_safe_input(sprintf(__('copy of %s'), $original_name)); $cont = 0; $exists = true; @@ -1266,7 +1266,8 @@ if (!empty($duplicate_module)) { // DUPLICATE agent module ! 'nombre', $copy_name); if ($exists) { $cont++; - $copy_name = sprintf(__('copy of %s (%d)'), $original_name, $cont); + $copy_name = io_safe_input( + sprintf(__('copy of %s (%d)'), $original_name, $cont)); } } diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index b8808381d8..be33697686 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -901,7 +901,7 @@ function alerts_duplicate_alert_template ($id_alert_template) { if ($template === false) return false; - $name = __('Copy of').' '.$template['name']; + $name = io_safe_input(__('Copy of') . ' ') . $template['name']; $type = $template['type']; $size = count ($template) / 2; diff --git a/pandora_console/include/functions_network_components.php b/pandora_console/include/functions_network_components.php index bd6d7f0e1f..1b6fab1bb4 100644 --- a/pandora_console/include/functions_network_components.php +++ b/pandora_console/include/functions_network_components.php @@ -471,7 +471,7 @@ function network_components_duplicate_network_component ($id_local_component) { if ($network === false) return false; - $name = __('Copy of').' '.$network['name']; + $name = io_safe_input(__('Copy of') . ' ') . $network['name']; unset($network['id_nc']); unset($network['name']); unset($network['category_name']);