2011-06-15 Koichiro Kikuchi <koichiro@rworks.jp>

* include/functions_ui.php: Fixed typos



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4446 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
koichirok 2011-06-15 06:41:58 +00:00
parent 4645c875fe
commit 7dfd20ce70
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2011-06-15 Koichiro Kikuchi <koichiro@rworks.jp>
* include/functions_ui.php: Fixed typos
2011-06-14 Segio Martin <sergio.martin@artica.es>
* include/functions_graph.php: Fixed manual definition of

View File

@ -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) {