Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0

This commit is contained in:
Laurent Destailleur 2020-03-11 17:01:47 +01:00
commit 27bdee9df1
2 changed files with 3 additions and 2 deletions

View File

@ -72,6 +72,7 @@ class box_commandes extends ModeleBoxes
public function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
$langs->load('orders');
$this->max = $max;

View File

@ -332,13 +332,13 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box
if (! empty($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength'];
if ($maxlength) $textwithnotags=dol_trunc($textwithnotags, $maxlength);
if (preg_match('/^<img/i', $text) || preg_match('/^<div/i', $text) || ! empty($contents[$i][$j]['asis'])) $out.= $text; // show text with no html cleaning
if (preg_match('/^<(img|div|span)/i', $text) || ! empty($contents[$i][$j]['asis'])) $out.= $text; // show text with no html cleaning
else $out.= $textwithnotags; // show text with html cleaning
// End Url
if (! empty($contents[$i][$j]['url'])) $out.= '</a>';
if (preg_match('/^<img/i', $text2) || preg_match('/^<div/i', $text2) || ! empty($contents[$i][$j]['asis2'])) $out.= $text2; // show text with no html cleaning
if (preg_match('/^<(img|div|span)/i', $text2) || ! empty($contents[$i][$j]['asis2'])) $out.= $text2; // show text with no html cleaning
else $out.= $text2withnotags; // show text with html cleaning
if (! empty($textnoformat)) $out.= "\n".$textnoformat."\n";