From 8acd81629ab1ec15786f9fbdf81ab0c5328ed112 Mon Sep 17 00:00:00 2001 From: marc_ocebo Date: Tue, 6 Dec 2005 15:26:39 +0000 Subject: [PATCH] =?UTF-8?q?Am=E9lioration:=20d=E9finir=20la=20constante=20?= =?UTF-8?q?MAIN=5FUSE=5FSHORT=5FTITLE=20=E0=200=20pour=20afficher=20les=20?= =?UTF-8?q?r=E9f=E9rences=20des=20pi=E8ces=20en=20entier=20dans=20les=20on?= =?UTF-8?q?glets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/lib/functions.inc.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index a0b9d0ed6a0..18083391c90 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -232,8 +232,10 @@ function dolibarr_fiche_head($links, $active=0, $title='') { $limittitle=30; print ''; - if (strlen($title) > $limittitle) print substr($title,0,$limittitle).'...'; - else print $title; + print + ((!defined('MAIN_USE_SHORT_TITLE')) || (defined('MAIN_USE_SHORT_TITLE') && MAIN_USE_SHORT_TITLE)) + ? dolibarr_trunc($title,$limittitle) + : $title; print ''; } @@ -519,8 +521,10 @@ function dolibarr_print_phone($phone,$country="FR") */ function dolibarr_trunc($string,$size=40) { - if (strlen($string) > $size) return substr($string,0,$size).'...'; - else return $string; + if (strlen($string) > $size) + return substr($string,0,$size).'...'; + else + return $string; } /**