2
0
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:
Regis Houssin
2007-03-20 12:12:51 +00:00
parent 4cf0a3a828
commit 16f83e1492
6 changed files with 944 additions and 933 deletions

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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);