From 7834a9b0995e5920f67db8acc4dac982d49244c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Dec 2014 00:51:57 +0100 Subject: [PATCH] Add hidden constant to solve bug of too low size to see products label. --- htdocs/core/class/html.form.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 272798a6f65..771a79cd95b 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1678,6 +1678,8 @@ class Form $outqty=1; $outdiscount=0; + $maxlengtharticle=(empty($conf->global->PRODUCT_MAX_LENGTH_COMBO)?48:$conf->global->PRODUCT_MAX_LENGTH_COMBO); + $label=$objp->label; if (! empty($objp->label_translated)) $label=$objp->label_translated; if (! empty($filterkey) && $filterkey != '') $label=preg_replace('/('.preg_quote($filterkey).')/i','$1',$label,1); @@ -1697,11 +1699,11 @@ class Form else if ($objp->stock <= 0) $opt.= ' class="product_line_stock_too_low"'; } $opt.= '>'; - $opt.= $objp->ref.' - '.dol_trunc($label,32).' - '; + $opt.= $objp->ref.' - '.dol_trunc($label,$maxlengtharticle).' - '; $objRef = $objp->ref; if (! empty($filterkey) && $filterkey != '') $objRef=preg_replace('/('.preg_quote($filterkey).')/i','$1',$objRef,1); - $outval.=$objRef.' - '.dol_trunc($label,32).' - '; + $outval.=$objRef.' - '.dol_trunc($label,$maxlengtharticle).' - '; $found=0;