mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 18:31:29 +01:00
Maxi debug for UTF8 support
This commit is contained in:
@@ -161,10 +161,10 @@ class ModeleNumRefCommandes
|
||||
\brief Cr<43>e un bon de commande sur disque en fonction d'un mod<6F>le
|
||||
\param db objet base de donn<6E>e
|
||||
\param id id de la propale <20> cr<63>er
|
||||
\param modele force le modele <20> utiliser ('' par defaut)
|
||||
\param modele force le modele <20> utiliser ('' to not force)
|
||||
\param outputlangs objet lang a utiliser pour traduction
|
||||
*/
|
||||
function commande_pdf_create($db, $id, $modele='', $outputlangs='')
|
||||
function commande_pdf_create($db, $id, $modele, $outputlangs)
|
||||
{
|
||||
global $conf,$langs;
|
||||
$langs->load("orders");
|
||||
@@ -203,14 +203,19 @@ function commande_pdf_create($db, $id, $modele='', $outputlangs='')
|
||||
|
||||
$obj = new $classname($db);
|
||||
|
||||
// We save charset_output to restore it because write_file can change it if needed for
|
||||
// output format that does not support UTF8.
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
if ($obj->write_file($id, $outputlangs) > 0)
|
||||
{
|
||||
$outputlangs->charset_output=$sav_charset_output;
|
||||
// on supprime l'image correspondant au preview
|
||||
commande_delete_preview($db, $id);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$outputlangs->charset_output=$sav_charset_output;
|
||||
dolibarr_syslog("Erreur dans commande_pdf_create");
|
||||
dolibarr_print_error($db,$obj->pdferror());
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user