From 33ee88da19f9a4316979590c8fb7cbf910c6442d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 20 Oct 2008 23:14:50 +0000 Subject: [PATCH] Doxygen --- htdocs/lib/functions.lib.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index afe0601db61..81ec79564ae 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -759,16 +759,21 @@ function dol_phone_link($phone,$option=0) */ function dolibarr_trunc($string,$size=40,$trunc='right') { + global $conf; + if ($size==0) return $string; if (! defined('USE_SHORT_TITLE') || (defined('USE_SHORT_TITLE') && USE_SHORT_TITLE)) { // We go always here if ($trunc == 'right') { + //mb_internal_encoding("UTF-8"); + //print $conf->character_set_client.'-'.mb_strlen($string).'-'.strlen($string); + //print 'ee'.$string.$size.mb_strcut($string,0,$size,'UTF-8').'rr'; if (strlen($string) > $size) - return substr($string,0,$size).'...'; + return substr($string,0,$size).'...'; else - return $string; + return $string; } if ($trunc == 'middle') {