From 7dfd20ce70c0a4bb9a5f21a8bc755c1729a67d22 Mon Sep 17 00:00:00 2001 From: koichirok Date: Wed, 15 Jun 2011 06:41:58 +0000 Subject: [PATCH] 2011-06-15 Koichiro Kikuchi * include/functions_ui.php: Fixed typos git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4446 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 4 ++++ pandora_console/include/functions_ui.php | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e238441cb2..47ff8c9e1c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2011-06-15 Koichiro Kikuchi + + * include/functions_ui.php: Fixed typos + 2011-06-14 Segio Martin * include/functions_graph.php: Fixed manual definition of diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index e0314bf183..6ec54b0a32 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -49,11 +49,11 @@ function ui_print_truncate_text($text, $numChars = 25, $showTextInAToopTip = tru $text = io_safe_output($text); if ((strlen($text)) > ($numChars)) { - $half_lenght = intval(($numChars - 3) / 2); // '/2' because [...] is in the middle of the word. - $truncateText2 = mb_strimwidth($text, (strlen($text) - $half_lenght), strlen($text)); + $half_length = intval(($numChars - 3) / 2); // '/2' because [...] is in the middle of the word. + $truncateText2 = mb_strimwidth($text, (strlen($text) - $half_length), strlen($text)); // In case $numChars were an odd number. - $half_lenght = $numChars - $half_lenght - 3; - $truncateText = mb_strimwidth($text, 0, $half_lenght) . $suffix; + $half_length = $numChars - $half_length - 3; + $truncateText = mb_strimwidth($text, 0, $half_length) . $suffix; $truncateText=$truncateText . $truncateText2; if ($showTextInTitle) {