diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
index b44414b8c29..dc8681a85fd 100644
--- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
+++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
@@ -377,92 +377,16 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$default_font_size = pdf_getPDFFontSize($outputlangs);
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf,$outputlangs,'BANK_CHEQUERECEIPT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
- $paramfreetext='BANK_CHEQUERECEIPT_FREE_TEXT';
- $marge_basse=$this->marge_basse;
- $marge_gauche=$this->marge_gauche;
- $page_hauteur=$this->page_hauteur;
// Line of free text
- $line=(! empty($conf->global->$paramfreetext))?$outputlangs->convToOutputCharset($conf->global->$paramfreetext):"";
-
- $pdf->SetFont('','', $default_font_size - 3);
- $pdf->SetDrawColor(224,224,224);
-
- // The start of the bottom of this page footer is positioned according to # of lines
- $freetextheight=0;
- if ($line) // Free text
- {
- //$line="eee
\nfdsfsdf
\nghfghg
";
- if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) // by default
- {
- $width=20000; $align='L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
- if (! empty($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT)) {
- $width=200; $align='C';
- }
- $freetextheight=$pdf->getStringHeight($width,$line);
- }
- else
- {
- $freetextheight=pdfGetHeightForHtmlContent($pdf,dol_htmlentitiesbr($line, 1, 'UTF-8', 0)); // New method (works for HTML content)
- //print '
'.$freetextheight;exit;
- }
- }
-
- $marginwithfooter=$marge_basse + $freetextheight;
- $posy=$marginwithfooter+0;
-
- if ($line) // Free text
- {
- $pdf->SetXY($dims['lm'],-$posy);
- if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) // by default
- {
- $pdf->MultiCell(0, 3, $line, 0, $align, 0);
- }
- else
- {
- $pdf->writeHTMLCell($pdf->page_largeur - $pdf->margin_left - $pdf->margin_right, $freetextheight, $dims['lm'], $dims['hk']-$marginwithfooter, dol_htmlentitiesbr($line, 1, 'UTF-8', 0));
- }
- $posy-=$freetextheight;
- }
-
- // On positionne le debut du bas de page selon nbre de lignes de ce bas de page
- /*
- $nbofline=dol_nboflines_bis($line,0,$outputlangs->charset_output);
- //print 'e'.$line.'t'.dol_nboflines($line);exit;
- $posy=$marge_basse + ($nbofline*3);
-
- if ($line) // Free text
+ $newfreetext='';
+ $paramfreetext='BANK_CHEQUERECEIPT_FREE_TEXT';
+ if (! empty($conf->global->$paramfreetext))
{
- $pdf->SetXY($marge_gauche,-$posy);
- $pdf->MultiCell(20000, 3, $line, 0, 'L', 0); // Use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
- $posy-=($nbofline*3); // 6 of ligne + 3 of MultiCell
- }*/
-
- $pdf->SetY(-$posy);
- $pdf->line($marge_gauche, $page_hauteur-$posy, 200, $page_hauteur-$posy);
- $posy--;
-
- /*if ($line1)
- {
- $pdf->SetXY($marge_gauche,-$posy);
- $pdf->MultiCell(200, 2, $line1, 0, 'C', 0);
+ $newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray);
}
-
- if ($line2)
- {
- $posy-=3;
- $pdf->SetXY($marge_gauche,-$posy);
- $pdf->MultiCell(200, 2, $line2, 0, 'C', 0);
- }*/
-
- // Show page nb only on iso languages (so default Helvetica font)
- if (pdf_getPDFFont($outputlangs) == 'Helvetica')
- {
- $pdf->SetXY(-20,-$posy);
- $pdf->MultiCell(11, 2, $pdf->PageNo().'/'.$pdf->getAliasNbPages(), 0, 'R', 0);
- }
+
+ return pdf_pagefoot($pdf,$outputlangs,$newfreetext,$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
-
}
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index ea330faef1a..6b14a6c99fa 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -590,8 +590,6 @@ class pdf_einstein extends ModelePDFCommandes
$this->error=$langs->trans("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR");
return 0;
}
- $this->error=$langs->trans("ErrorUnknown");
- return 0; // Erreur par defaut
}
/**
diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
index a25c9918408..411b3deadf3 100644
--- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php
+++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
@@ -406,8 +406,6 @@ class pdf_strato extends ModelePDFContract
$this->error=$langs->trans("ErrorConstantNotDefined","CONTRACT_OUTPUTDIR");
return 0;
}
- $this->error=$langs->trans("ErrorUnknown");
- return 0; // Erreur par defaut
}
/**
diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php
index c20eb924e97..314d5779ede 100644
--- a/htdocs/core/modules/dons/html_cerfafr.modules.php
+++ b/htdocs/core/modules/dons/html_cerfafr.modules.php
@@ -269,8 +269,6 @@ class html_cerfafr extends ModeleDon
$this->error=$langs->trans("ErrorConstantNotDefined","DON_OUTPUTDIR");
return 0;
}
- $this->error=$langs->trans("ErrorUnknown");
- return 0; // Error by default
}
}
diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
index c46e675b34c..abc40f23005 100644
--- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
@@ -482,8 +482,6 @@ class pdf_standard extends ModeleExpenseReport
$this->error=$langs->trans("ErrorConstantNotDefined","EXPENSEREPORT_OUTPUTDIR");
return 0;
}
- $this->error=$langs->trans("ErrorUnknown");
- return 0; // Erreur par defaut
}
/**
diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
index 5711c5b698c..83306b95adb 100644
--- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
+++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
@@ -405,8 +405,6 @@ class pdf_soleil extends ModelePDFFicheinter
$this->error=$langs->trans("ErrorConstantNotDefined","FICHEINTER_OUTPUTDIR");
return 0;
}
- $this->error=$langs->trans("ErrorUnknown");
- return 0; // Erreur par defaut
}
/**
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index 7d9dc1df1ef..19d09fd7631 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -763,9 +763,6 @@ class pdf_azur extends ModelePDFPropales
$this->error=$langs->trans("ErrorConstantNotDefined","PROP_OUTPUTDIR");
return 0;
}
-
- $this->error=$langs->trans("ErrorUnknown");
- return 0; // Erreur par defaut
}
/**
diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
index cd6f0b1fdc9..c5f68df95c1 100644
--- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
@@ -549,8 +549,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->error=$langs->trans("ErrorConstantNotDefined","SUPPLIER_OUTPUTDIR");
return 0;
}
- $this->error=$langs->trans("ErrorUnknown");
- return 0; // Erreur par defaut
}
/**
diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
index 411c2325e2e..8d7093bfe73 100644
--- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
@@ -572,8 +572,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$this->error=$langs->trans("ErrorConstantNotDefined","SUPPLIER_OUTPUTDIR");
return 0;
}
- $this->error=$langs->trans("ErrorUnknown");
- return 0; // Erreur par defaut
}
diff --git a/htdocs/core/triggers/interface_20_all_Logevents.class.php b/htdocs/core/triggers/interface_20_all_Logevents.class.php
index 431bc1bff7c..48702607b77 100644
--- a/htdocs/core/triggers/interface_20_all_Logevents.class.php
+++ b/htdocs/core/triggers/interface_20_all_Logevents.class.php
@@ -198,8 +198,6 @@ class InterfaceLogevents extends DolibarrTriggers
dol_syslog(get_class($this).": ".$this->error, LOG_ERR);
return -1;
}
-
- return 0;
}
}
diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php
index 95d5b33e162..689771ad223 100644
--- a/htdocs/societe/canvas/actions_card_common.class.php
+++ b/htdocs/societe/canvas/actions_card_common.class.php
@@ -260,7 +260,6 @@ abstract class ActionsCardCommon
return;
}
}
- exit;
}
else
{