diff --git a/htdocs/includes/modules/action/rapport.pdf.php b/htdocs/includes/modules/action/rapport.pdf.php index 362fc3a1a784921e82524c39193f03e4a88b785c..bf0ffe8d18a0d12d9be14b74b1f8d50bbe6f3a7e 100644 --- a/htdocs/includes/modules/action/rapport.pdf.php +++ b/htdocs/includes/modules/action/rapport.pdf.php @@ -84,8 +84,6 @@ class CommActionRapport $outputlangs->load("bills"); $outputlangs->load("products"); - $outputlangs->setPhpLang(); - $dir = $conf->agenda->dir_temp."/"; $file = $dir . "actions-".$this->month."-".$this->year.".pdf"; diff --git a/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php index a949c9a2713bdd618871117701a0e8920e9b9193..315e2574bf4a91edd4e8ba3dead9b64443fe08ed 100644 --- a/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php +++ b/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php @@ -67,7 +67,7 @@ class BordereauChequeBlochet extends FPDF // Recupere emmetteur $this->emetteur=$mysoc; - if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'�tait pas d�fini + if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'�tait pas d�fini // Defini position des colonnes $this->line_height = 5; @@ -95,8 +95,6 @@ class BordereauChequeBlochet extends FPDF $outputlangs->load("bills"); $outputlangs->load("products"); - $outputlangs->setPhpLang(); - $dir = $_dir . "/".get_exdir($number); if (! is_dir($dir)) @@ -156,13 +154,12 @@ class BordereauChequeBlochet extends FPDF if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - $langs->setPhpLang(); // On restaure langue session return 1; // Pas d'erreur } /** - * \brief Renvoi le dernier message d'erreur de cr�ation de propale + * \brief Renvoi le dernier message d'erreur de cr�ation de propale */ function pdferror() { diff --git a/htdocs/includes/modules/commande/pdf_edison.modules.php b/htdocs/includes/modules/commande/pdf_edison.modules.php index 01e720721d65ddb35d2369f1830899107d1128e7..524db2e7a05479ce6220449ee22be8def1326418 100644 --- a/htdocs/includes/modules/commande/pdf_edison.modules.php +++ b/htdocs/includes/modules/commande/pdf_edison.modules.php @@ -114,8 +114,6 @@ class pdf_edison extends ModelePDFCommandes $outputlangs->load("products"); $outputlangs->load("orders"); - $outputlangs->setPhpLang(); - // Definition de l'objet $com (pour compatibilite ascendante) if (! is_object($com)) { @@ -144,7 +142,6 @@ class pdf_edison extends ModelePDFCommandes if (create_exdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session return 0; } } @@ -303,19 +300,16 @@ class pdf_edison extends ModelePDFCommandes if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - $langs->setPhpLang(); // On restaure langue session return 1; } } else { $this->error=$langs->transnoentities("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR"); - $langs->setPhpLang(); // On restaure langue session return 0; } $this->error=$langs->transnoentities("ErrorUnknown"); - $langs->setPhpLang(); // On restaure langue session return 0; // Erreur par defaut } diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index 539eab4f53f491fdd1bc54f1f6a52edf60671194..a7f24d9f4650208ca664d381ec4eb1caa99c233b 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -119,8 +119,6 @@ class pdf_einstein extends ModelePDFCommandes $outputlangs->load("products"); $outputlangs->load("orders"); - $outputlangs->setPhpLang(); - if ($conf->commande->dir_output) { // Definition de l'objet $com (pour compatibilite ascendante) @@ -368,24 +366,20 @@ class pdf_einstein extends ModelePDFCommandes if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - $langs->setPhpLang(); // On restaure langue session return 1; // Pas d'erreur } else { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session return 0; } } else { $this->error=$langs->trans("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR"); - $langs->setPhpLang(); // On restaure langue session return 0; } $this->error=$langs->trans("ErrorUnknown"); - $langs->setPhpLang(); // On restaure langue session return 0; // Erreur par defaut } diff --git a/htdocs/includes/modules/dons/html_cerfafr.modules.php b/htdocs/includes/modules/dons/html_cerfafr.modules.php index c7f88fffe14bb274789d73d6aa0a127eee159910..dc19adc880b7617639b3509b2b2747f43762bc77 100644 --- a/htdocs/includes/modules/dons/html_cerfafr.modules.php +++ b/htdocs/includes/modules/dons/html_cerfafr.modules.php @@ -156,18 +156,15 @@ class html_cerfafr extends ModeleDon else { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session return 0; } } else { $this->error=$langs->trans("ErrorConstantNotDefined","DON_OUTPUTDIR"); - $langs->setPhpLang(); // On restaure langue session return 0; } $this->error=$langs->trans("ErrorUnknown"); - $langs->setPhpLang(); // On restaure langue session return 0; // Erreur par defaut } diff --git a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php index 979e504d32568cfa56006e435d5e28a530e2668b..4030bb232d827343b383bb81e42a67fa13ca4567 100644 --- a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php +++ b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php @@ -90,8 +90,6 @@ Class pdf_expedition_merou extends ModelePdfExpedition $outputlangs->load("propal"); $outputlangs->load("sendings"); - $outputlangs->setPhpLang(); - //Generation de la fiche $this->expe = $object; @@ -252,24 +250,20 @@ Class pdf_expedition_merou extends ModelePdfExpedition $pdf->Output($file); - $langs->setPhpLang(); // On restaure langue session return 1; } else { $this->error=$outputlangs->transnoentities("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session return 0; } } else { $this->error=$outputlangs->transnoentities("ErrorConstantNotDefined","EXP_OUTPUTDIR"); - $langs->setPhpLang(); // On restaure langue session return 0; } $this->error=$outputlangs->transnoentities("ErrorUnknown"); - $langs->setPhpLang(); // On restaure langue session return 0; // Erreur par defaut } diff --git a/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php b/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php index 15245a33e59da8c6cca3353140eb23731119159b..68cb51cfdd3ccbac23dd5f3871128a0b5a5ec6f1 100644 --- a/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php +++ b/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php @@ -163,8 +163,6 @@ Class pdf_expedition_rouget extends ModelePdfExpedition $outputlangs->load("products"); $outputlangs->load("propal"); - $outputlangs->setPhpLang(); - if ($conf->expedition_bon->dir_output) { // Definition de $dir et $file @@ -279,24 +277,20 @@ Class pdf_expedition_rouget extends ModelePdfExpedition if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - $langs->setPhpLang(); // On restaure langue session return 1; } else { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session return 0; } } else { $this->error=$langs->transnoentities("ErrorConstantNotDefined","EXP_OUTPUTDIR"); - $langs->setPhpLang(); // On restaure langue session return 0; } $this->error=$langs->transnoentities("ErrorUnknown"); - $langs->setPhpLang(); // On restaure langue session return 0; // Erreur par defaut } diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index 6def0c5ab4f218bd34e5255b6eb5a0f62acf7d91..2a2cf3e22632f1255e2c795a074e11580f14ddb0 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -120,8 +120,6 @@ class pdf_crabe extends ModelePDFFactures $outputlangs->load("bills"); $outputlangs->load("products"); - $outputlangs->setPhpLang(); - if ($conf->facture->dir_output) { // Definition de l'objet $fac (pour compatibilite ascendante) @@ -381,24 +379,20 @@ class pdf_crabe extends ModelePDFFactures if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - $langs->setPhpLang(); // On restaure langue session return 1; // Pas d'erreur } else { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session return 0; } } else { $this->error=$langs->trans("ErrorConstantNotDefined","FAC_OUTPUTDIR"); - $langs->setPhpLang(); // On restaure langue session return 0; } $this->error=$langs->trans("ErrorUnknown"); - $langs->setPhpLang(); // On restaure langue session return 0; // Erreur par defaut } diff --git a/htdocs/includes/modules/facture/pdf_oursin.modules.php b/htdocs/includes/modules/facture/pdf_oursin.modules.php index 33c4f8eb9d24053cf2fa8e3810ff5048ac73101d..9d8f1e629616a46af6b8813ba66155705775d249 100644 --- a/htdocs/includes/modules/facture/pdf_oursin.modules.php +++ b/htdocs/includes/modules/facture/pdf_oursin.modules.php @@ -120,8 +120,6 @@ class pdf_oursin extends ModelePDFFactures $outputlangs->load("bills"); $outputlangs->load("products"); - $outputlangs->setPhpLang(); - if ($conf->facture->dir_output) { // Definition de l'objet $fac (pour compatibilite ascendante) @@ -155,7 +153,6 @@ class pdf_oursin extends ModelePDFFactures if (create_exdir($dir) < 0) { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session return 0; } } @@ -293,24 +290,20 @@ class pdf_oursin extends ModelePDFFactures if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - $langs->setPhpLang(); // On restaure langue session return 1; // Pas d'erreur } else { $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session return 0; } } else { $this->error=$langs->transnoentities("ErrorConstantNotDefined","FAC_OUTPUTDIR"); - $langs->setPhpLang(); // On restaure langue session return 0; } $this->error=$langs->transnoentities("ErrorUnknown"); - $langs->setPhpLang(); // On restaure langue session return 0; // Erreur par defaut } diff --git a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php index 838d12ed6afd316d7de6db9fd339777f0bacdb06..1183c2830240ac9d30e295c7b54dd71f3577b797 100644 --- a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php +++ b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php @@ -92,8 +92,6 @@ class pdf_soleil extends ModelePDFFicheinter $outputlangs->load("companies"); $outputlangs->load("interventions"); - $outputlangs->setPhpLang(); - if ($conf->ficheinter->dir_output) { // If $fichinter is id instead of object @@ -328,7 +326,6 @@ class pdf_soleil extends ModelePDFFicheinter if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - $langs->setPhpLang(); // On restaure langue session return 1; } else diff --git a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php index 91a95656e8a513711be5155b3a1e616488f3154c..b865f8322dcc6d9d95139c7106d451a28384ac4b 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php @@ -104,8 +104,6 @@ class pdf_sirocco extends ModelePDFDeliveryOrder $outputlangs->load("deliveries"); $outputlangs->load("sendings"); - $outputlangs->setPhpLang(); - if ($conf->livraison_bon->dir_output) { // If $object is id instead of object diff --git a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php index 3dd718afc5a220631b873204f08e3cb2b87a31a7..58657de876d63e8332a2eb21614e165b0f53cd81 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php @@ -125,8 +125,6 @@ class pdf_typhon extends ModelePDFDeliveryOrder $outputlangs->load("deliveries"); $outputlangs->load("sendings"); - $outputlangs->setPhpLang(); - if ($conf->livraison_bon->dir_output) { // If $delivery is id instead of object diff --git a/htdocs/includes/modules/member/PDF_card.class.php b/htdocs/includes/modules/member/PDF_card.class.php index a466264622e9082bf7d2c453799376353c7e59bf..b2091e1ee9b1be17ae7b01c4cc8611d3f7bb4584 100644 --- a/htdocs/includes/modules/member/PDF_card.class.php +++ b/htdocs/includes/modules/member/PDF_card.class.php @@ -29,12 +29,12 @@ //////////////////////////////////////////////////// // PDF_Label // -// Classe afin d'�diter au format PDF des �tiquettes -// au format Avery ou personnalis� +// Classe afin d'�diter au format PDF des �tiquettes +// au format Avery ou personnalis� // // // Copyright (C) 2003 Laurent PASSEBECQ (LPA) -// Bas� sur les fonctions de Steve Dillon : steved@mad.scientist.com +// Bas� sur les fonctions de Steve Dillon : steved@mad.scientist.com // //------------------------------------------------------------------- // VERSIONS : @@ -56,7 +56,7 @@ /** \file htdocs/adherents/cartes/PDF_card.class.php \ingroup adherent - \brief Fichier de la classe permettant d'�diter au format PDF des �tiquettes au format Avery ou personnalis� + \brief Fichier de la classe permettant d'�diter au format PDF des �tiquettes au format Avery ou personnalis� \author Steve Dillon \author Laurent Passebecq \author Rodolphe Quiedville @@ -70,22 +70,22 @@ require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdfi/fpdi_protection.php'); /** \class PDF_card - \brief Classe afin d'�diter au format PDF des �tiquettes au format Avery ou personnalis� + \brief Classe afin d'�diter au format PDF des �tiquettes au format Avery ou personnalis� */ class PDF_card extends FPDF { - // Propri�t�s priv�es - var $_Avery_Name = ''; // Nom du format de l'�tiquette - var $_Margin_Left = 0; // Marge de gauche de l'�tiquette - var $_Margin_Top = 0; // marge en haut de la page avant la premi�re �tiquette - var $_X_Space = 0; // Espace horizontal entre 2 bandes d'�tiquettes - var $_Y_Space = 0; // Espace vertical entre 2 bandes d'�tiquettes - var $_X_Number = 0; // Nombre d'�tiquettes sur la largeur de la page - var $_Y_Number = 0; // Nombre d'�tiquettes sur la hauteur de la page - var $_Width = 0; // Largeur de chaque �tiquette - var $_Height = 0; // Hauteur de chaque �tiquette - var $_Char_Size = 10; // Hauteur des caract�res - var $_Line_Height = 10; // Hauteur par d�faut d'une ligne + // Propri�t�s priv�es + var $_Avery_Name = ''; // Nom du format de l'�tiquette + var $_Margin_Left = 0; // Marge de gauche de l'�tiquette + var $_Margin_Top = 0; // marge en haut de la page avant la premi�re �tiquette + var $_X_Space = 0; // Espace horizontal entre 2 bandes d'�tiquettes + var $_Y_Space = 0; // Espace vertical entre 2 bandes d'�tiquettes + var $_X_Number = 0; // Nombre d'�tiquettes sur la largeur de la page + var $_Y_Number = 0; // Nombre d'�tiquettes sur la hauteur de la page + var $_Width = 0; // Largeur de chaque �tiquette + var $_Height = 0; // Hauteur de chaque �tiquette + var $_Char_Size = 10; // Hauteur des caract�res + var $_Line_Height = 10; // Hauteur par d�faut d'une ligne var $_Metric = 'mm'; // Type of metric.. Will help to calculate good values var $_Metric_Doc = 'mm'; // Type of metric for the doc.. @@ -227,7 +227,7 @@ class PDF_card extends FPDF { $this->SetAutoPageBreak(false); $this->_Metric_Doc = $unit; - // Permet de commencer l'impression � l'�tiquette d�sir�e dans le cas o� la page a d�j� servie + // Permet de commencer l'impression � l'�tiquette d�sir�e dans le cas o� la page a d�j� servie if ($posX > 0) $posX--; else $posX=0; if ($posY > 0) $posY--; else $posY=0; $this->_COUNTX = $posX; @@ -236,7 +236,7 @@ class PDF_card extends FPDF { } - //M�thode qui permet de modifier la taille des caract�res + //M�thode qui permet de modifier la taille des caract�res // Cela modiera aussi l'espace entre chaque ligne function Set_Char_Size($pt) { if ($pt > 3) { @@ -247,7 +247,7 @@ class PDF_card extends FPDF { } - // On imprime une �tiqette + // On imprime une �tiqette function Add_PDF_card($texte,$header='',$footer='',$outputlangs) { global $langs; @@ -261,8 +261,6 @@ class PDF_card extends FPDF { $outputlangs->load("companies"); $outputlangs->load("members"); -// $outputlangs->setPhpLang(); - // We are in a new page, then we must add a page if (($this->_COUNTX ==0) and ($this->_COUNTY==0) and (!$this->_First==1)) { $this->AddPage(); @@ -317,8 +315,6 @@ class PDF_card extends FPDF { $this->_COUNTX=0; $this->_COUNTY=0; } - -// $langs->setPhpLang(); // On restaure langue session } @@ -390,7 +386,7 @@ class PDF_card extends FPDF { // Give the height for a char size given. function _Get_Height_Chars($pt) { - // Tableau de concordance entre la hauteur des caract�res et de l'espacement entre les lignes + // Tableau de concordance entre la hauteur des caract�res et de l'espacement entre les lignes $_Table_Hauteur_Chars = array(6=>2, 7=>2.5, 8=>3, 9=>4, 10=>5, 11=>6, 12=>7, 13=>8, 14=>9, 15=>10); if (in_array($pt, array_keys($_Table_Hauteur_Chars))) { return $_Table_Hauteur_Chars[$pt]; diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index 7c8ab2745bde34987b3448cda65c7cc88b885113..6877cbd55c8eb166dd7df8a3863b297e233837d6 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -121,8 +121,6 @@ class pdf_propale_azur extends ModelePDFPropales $outputlangs->load("propal"); $outputlangs->load("products"); - $outputlangs->setPhpLang(); - if ($conf->propale->dir_output) { // D�finition de l'objet $propale (pour compatibilite ascendante) @@ -262,7 +260,7 @@ class pdf_propale_azur extends ModelePDFPropales $pdf->SetXY ($this->posxtva, $curY); $pdf->MultiCell($this->posxup-$this->posxtva-1, 4, vatrate($propale->lignes[$i]->tva_tx,1,$propale->lignes[$i]->info_bits), 0, 'R'); } - + // Prix unitaire HT avant remise $pdf->SetXY ($this->posxup, $curY); $pdf->MultiCell($this->posxqty-$this->posxup-1, 4, price($propale->lignes[$i]->subprice), 0, 'R', 0); @@ -392,25 +390,21 @@ class pdf_propale_azur extends ModelePDFPropales //$pdfConcat->Output($file); $outputlangs->charset_output=$sav_charset_output; - $langs->setPhpLang(); // On restaure langue session return 1; // Pas d'erreur } else { $this->error=$langs->trans("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session return 0; } } else { $this->error=$langs->trans("ErrorConstantNotDefined","PROP_OUTPUTDIR"); - $langs->setPhpLang(); // On restaure langue session return 0; } $this->error=$langs->trans("ErrorUnknown"); - $langs->setPhpLang(); // On restaure langue session return 0; // Erreur par defaut } @@ -569,7 +563,7 @@ class pdf_propale_azur extends ModelePDFPropales function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs) { global $conf; - + $tab2_top = $posy; $tab2_hl = 5; $tab2_height = $tab2_hl * 4; @@ -590,7 +584,7 @@ class pdf_propale_azur extends ModelePDFPropales // Show VAT by rates and total $pdf->SetFillColor(248,248,248); - + $this->atleastoneratenotnull=0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { @@ -599,10 +593,10 @@ class pdf_propale_azur extends ModelePDFPropales if ($tvakey) // On affiche pas taux 0 { $this->atleastoneratenotnull++; - + $index++; $pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index); - + $tvacompl=''; if (eregi('\*',$tvakey)) { @@ -612,7 +606,7 @@ class pdf_propale_azur extends ModelePDFPropales $totalvat =$outputlangs->transnoentities("TotalVAT").' '; $totalvat.=vatrate($tvakey,1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - + $pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); } @@ -623,12 +617,12 @@ class pdf_propale_azur extends ModelePDFPropales $index++; $pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1); - + $pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1); } } - + $useborder=0; // Total TTC @@ -639,12 +633,12 @@ class pdf_propale_azur extends ModelePDFPropales $pdf->SetTextColor(0,0,60); $pdf->SetFillColor(224,224,224); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); - + $pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1); $pdf->SetTextColor(0,0,0); } - + if ($deja_regle > 0) { $index++; @@ -722,7 +716,7 @@ class pdf_propale_azur extends ModelePDFPropales $pdf->SetXY ($this->posxtva-1, $tab_top+2); $pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C'); } - + $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); $pdf->SetXY ($this->posxup-1, $tab_top+2); $pdf->MultiCell(18,2, $outputlangs->transnoentities("PriceUHT"),'','C'); diff --git a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php index de5955cea3aec38068639836e1c70caba07129df..2b4d68df0a5590d898d5514aae652258660f7810 100644 --- a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php @@ -105,8 +105,6 @@ class pdf_propale_jaune extends ModelePDFPropales $outputlangs->load("propal"); $outputlangs->load("products"); - $outputlangs->setPhpLang(); - if ($conf->propale->dir_output) { // D�finition de l'objet $propal (pour compatibilite ascendante) @@ -302,7 +300,6 @@ class pdf_propale_jaune extends ModelePDFPropales if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - $langs->setPhpLang(); // On restaure langue session return 1; } } diff --git a/htdocs/includes/modules/rapport/pdf_paiement.class.php b/htdocs/includes/modules/rapport/pdf_paiement.class.php index bd0735e2b84787802067990ddef76c79330dc62b..4df8c1f4866f872d3436477ef7dfeda89484ae33 100644 --- a/htdocs/includes/modules/rapport/pdf_paiement.class.php +++ b/htdocs/includes/modules/rapport/pdf_paiement.class.php @@ -81,8 +81,6 @@ class pdf_paiement extends FPDF // Force output charset to ISO, because FPDF expect text to be encoded in ISO $outputlangs->charset_output='ISO-8859-1'; - $outputlangs->setPhpLang(); - $this->month=$month; $this->year=$year; @@ -206,7 +204,6 @@ class pdf_paiement extends FPDF if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - $langs->setPhpLang(); // On restaure langue session return 1; } diff --git a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php index f4ff209b88d824805d42bb8a6fb71109fd61682d..bf047153e050fa5ca3321be99cda6e5b6f81bd96 100644 --- a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -121,8 +121,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $outputlangs->load("products"); $outputlangs->load("orders"); - $outputlangs->setPhpLang(); - if ($conf->fournisseur->commande->dir_output) { // Definition de l'objet $com (pour compatibilite ascendante) diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 3371fb51cc7b764da66744a17386a232ae3bb506..92530280a5f1a5a322ecb9e354767f3eabaa0c35 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -178,7 +178,6 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* plus pris en comp // Defini objet langs $langs = new Translate('..',$conf); $langs->setDefaultLang('auto'); -$langs->setPhpLang(); $bc[false]=' class="bg1"'; $bc[true]=' class="bg2"'; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index b71a553619c4b7515ebd907f2beb58f291d66a9b..dcd25540953956496040afc131042a8ed45f2ad2 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -526,14 +526,12 @@ if (empty($_GET["lang"])) // If language was not forced on URL if ($langs->getDefaultLang() != $user->conf->MAIN_LANG_DEFAULT) { $langs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT); - $langs->setPhpLang(); } } } else // If language was forced on URL { $langs->setDefaultLang($_GET["lang"]); - $langs->setPhpLang(); } diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 377e99fadeaa072ed1ecae62fb45ace94ff44cd2..ff576f83456b1783b53d51b1293d1575f29e37cb 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -306,7 +306,6 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC')) if (! defined('NOREQUIRETRAN')) { $langs->setDefaultLang($conf->global->MAIN_LANG_DEFAULT); - $langs->setPhpLang(); } /* diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index 7c41e3c1870c758c93aa9399030f47a90965a8dc..6a1867db5fced36fb874e3875eefd09be7edff3c 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -141,7 +141,6 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* plus pris en comp $langs = new Translate('..',$conf); if (isset($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); else $langs->setDefaultLang('auto'); -$langs->setPhpLang(); $bc[false]=' class="bg1"'; $bc[true]=' class="bg2"'; diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php index e0ed554455039e3bf1513d7f56a10d482b5c1c67..eaee61424c9af9797a87584d808b4fbc5d39b84b 100644 --- a/htdocs/translate.class.php +++ b/htdocs/translate.class.php @@ -82,7 +82,7 @@ class Translate { } /** - * \brief Positionne la chaine traduite pour une cl� donn�e. + * \brief Positionne la chaine traduite pour une cle donnee. * \param key Key to translate * \return string Translated string */ @@ -143,30 +143,12 @@ class Translate { /** - \brief Positionne environnement PHP en fonction du langage - \remarks Le code langue long (fr_FR, en_US, ...) doit avoir etre positionne par setDefaultLang - \return int >0 si ok, <0 so ko - \deprecated + * \brief Deprecated function. Do nothing. Kept for backward compatibility. + * \deprecated */ function setPhpLang() { - //dol_syslog("Translate::setPhpLang ".$this->defaultlang,LOG_DEBUG); return; - /* - $code_lang_tiret=ereg_replace('_','-',$this->defaultlang); - //print 'code_lang_tiret='.$code_lang_tiret; - setlocale(LC_ALL, $this->defaultlang); // Some OS (Windows) need local with _ - setlocale(LC_ALL, $code_lang_tiret); // Other OS need local with - - - if (defined("MAIN_FORCE_SETLOCALE_LC_ALL") && MAIN_FORCE_SETLOCALE_LC_ALL) - $res_lc_all=setlocale(LC_ALL, MAIN_FORCE_SETLOCALE_LC_ALL.'.UTF-8', MAIN_FORCE_SETLOCALE_LC_ALL); - if (defined("MAIN_FORCE_SETLOCALE_LC_NUMERIC") && MAIN_FORCE_SETLOCALE_LC_NUMERIC) - $res_lc_numeric=setlocale(LC_NUMERIC, MAIN_FORCE_SETLOCALE_LC_NUMERIC.'.UTF-8', MAIN_FORCE_SETLOCALE_LC_NUMERIC); - if (defined("MAIN_FORCE_SETLOCALE_LC_MONETARY") && MAIN_FORCE_SETLOCALE_LC_MONETARY) - $res_lc_monetary=setlocale(LC_MONETARY, MAIN_FORCE_SETLOCALE_LC_MONETARY.'UTF-8', MAIN_FORCE_SETLOCALE_LC_MONETARY); - //print 'x'.$res_lc_all; - return 1; - */ } @@ -182,6 +164,7 @@ class Translate { */ function Load($domain,$alt=0) { + global $conf; //dol_syslog("Translate::Load domain=".$domain." alt=".$alt); // Check parameters @@ -305,6 +288,18 @@ class Translate { } } + // Format for date + /* TODO If lang file is main, we modify the format constants + $this->format_date_short="%d/%m/%Y"; # Format of day with PHP/C tags (strftime functions) + $this->format_date_short_java="dd/MM/yyyy"; # Format of day with Java tags + $this->format_hour_short="%H:%M"; + $this->format_date_text_short="%d %b %Y"; + $this->format_date_text="%d %B %Y"; + $this->format_date_hour_short="%d/%m/%Y %H:%M"; + $this->format_date_hour_text_short="%d %b %Y %H:%M"; + $this->format_date_hour_text="%d %B %Y %H:%M"; + */ + if (empty($this->tab_loaded[$domain])) $this->tab_loaded[$domain]=2; // Marque ce fichier comme non trouve return 1;