forked from Wavyzz/dolibarr
Fix: problme d'affichage de la description si fckeditor est actif mais dsactiv sur les descriptions produits
This commit is contained in:
@@ -257,14 +257,14 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
||||
|
||||
if ($conf->fckeditor->enabled)
|
||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
||||
{
|
||||
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$pdf->SetXY ($this->posxdesc-1, $curY);
|
||||
$pdf->MultiCell(108, 4, $libelleproduitservice, 0, 'J');
|
||||
$pdf->MultiCell(108, 4, dol_entity_decode($libelleproduitservice), 0, 'J');
|
||||
}
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
@@ -259,14 +259,14 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
||||
|
||||
if ($conf->fckeditor->enabled)
|
||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
||||
{
|
||||
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$pdf->SetXY ($this->posxdesc-1, $curY);
|
||||
$pdf->MultiCell(108, 4, $libelleproduitservice, 0, 'J');
|
||||
$pdf->MultiCell(108, 4, dol_entity_decode($libelleproduitservice), 0, 'J');
|
||||
}
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
@@ -256,14 +256,14 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
||||
|
||||
if ($conf->fckeditor->enabled)
|
||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
||||
{
|
||||
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$pdf->SetXY ($this->posxdesc-1, $curY);
|
||||
$pdf->MultiCell(108, 4, $libelleproduitservice, 0, 'J');
|
||||
$pdf->MultiCell(108, 4, dol_entity_decode($libelleproduitservice), 0, 'J');
|
||||
}
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
@@ -2298,14 +2298,25 @@ function weight_units_string($unit)
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Nettoie le code HTML
|
||||
\brief Decode le code html
|
||||
\param string StringHtml
|
||||
\return string DecodeString
|
||||
*/
|
||||
function dol_entity_decode($StringHtml)
|
||||
{
|
||||
$DecodeString = html_entity_decode($StringHtml);
|
||||
return $DecodeString;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Supprime le code html
|
||||
\param string StringHtml
|
||||
\return string CleanString
|
||||
*/
|
||||
function clean_html($StringHtml)
|
||||
{
|
||||
$pattern = "<[^>]+>";
|
||||
$temp = html_entity_decode($StringHtml);
|
||||
$temp = dol_entity_decode($StringHtml);
|
||||
$temp = ereg_replace($pattern,"",$temp);
|
||||
// Supprime aussi les retours
|
||||
$temp=str_replace("\n"," ",$temp);
|
||||
|
||||
Reference in New Issue
Block a user