From 3c8f9c65b2fa183dd51e95ae89b323bb4ec02520 Mon Sep 17 00:00:00 2001 From: hkosaka Date: Wed, 13 Jun 2012 04:35:51 +0000 Subject: [PATCH] 2012-06-13 Hirofumi Kosaka * operation/agentes/estado_ultimopaquete.php: Merged from 4.0.x: Fixed string truncation problem for multi-byte characters. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6523 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ .../operation/agentes/estado_ultimopaquete.php | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f3513dc5d8..0e693c8dcc 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-06-13 Hirofumi Kosaka + + * operation/agentes/estado_ultimopaquete.php: Merged from 4.0.x: + Fixed string truncation problem for multi-byte characters. + 2012-06-12 Juan Manuel Ramon * include/functions_graph.php: Added options for progress_bar graph. diff --git a/pandora_console/operation/agentes/estado_ultimopaquete.php b/pandora_console/operation/agentes/estado_ultimopaquete.php index 31b5f983d8..579a9a48b4 100644 --- a/pandora_console/operation/agentes/estado_ultimopaquete.php +++ b/pandora_console/operation/agentes/estado_ultimopaquete.php @@ -418,10 +418,7 @@ foreach ($modules as $module) { AND ($module["id_tipo_modulo"] != 17) AND ($module["id_tipo_modulo"] != 23)) { echo ""; - echo io_safe_output(substr($module["descripcion"],0,32)); - if (strlen($module["descripcion"]) > 32){ - echo "..."; - } + echo mb_strimwidth(io_safe_output($module["descripcion"]), 0, 35, "...", "UTF-8"); echo ""; } else{ @@ -459,10 +456,7 @@ foreach ($modules as $module) { else $colspan= 1; echo ""; - echo substr(io_safe_output($module["datos"]),0,42); - if (strlen(io_safe_output($module["datos"])) > 42){ - echo "..."; - } + echo mb_strimwidth(io_safe_output($module["datos"]), 0, 45, "...", "UTF-8"); } echo "";