";
// Note publique
@@ -2334,7 +2334,7 @@ else
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
- $result=facture_pdf_create($db, $fac->id, '', $_REQUEST['modelpdf'], $outputlangs);
+ $result=facture_pdf_create($db, $fac->id, '', $_REQUEST['model'], $outputlangs);
if ($result <= 0)
{
dolibarr_print_error($db,$result);
@@ -2389,7 +2389,7 @@ else
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
- $result=facture_pdf_create($db, $fac->id, '', $_REQUEST['modelpdf'], $outputlangs);
+ $result=facture_pdf_create($db, $fac->id, '', $_REQUEST['model'], $outputlangs);
if ($result <= 0)
{
dolibarr_print_error($db,$result);
diff --git a/htdocs/don.class.php b/htdocs/don.class.php
index 989b609d99d..9c60d497456 100644
--- a/htdocs/don.class.php
+++ b/htdocs/don.class.php
@@ -70,9 +70,12 @@ class Don
$this->modepaiementid = 0;
$langs->load("donations");
- $this->labelstatut[0]=$langs->trans("DonationStatusPromessNotValidated");
- $this->labelstatut[1]=$langs->trans("DonationStatusPromessValidated");
+ $this->labelstatut[0]=$langs->trans("DonationStatusPromiseNotValidated");
+ $this->labelstatut[1]=$langs->trans("DonationStatusPromiseValidated");
$this->labelstatut[2]=$langs->trans("DonationStatusPayed");
+ $this->labelstatutshort[0]=$langs->trans("DonationStatusPromiseNotValidatedShort");
+ $this->labelstatutshort[1]=$langs->trans("DonationStatusPromiseValidatedShort");
+ $this->labelstatutshort[2]=$langs->trans("DonationStatusPayedShort");
}
@@ -98,20 +101,17 @@ class Don
if ($mode == 0)
{
- $prefix='';
return $this->labelstatut[$statut];
}
if ($mode == 1)
{
- $prefix='Short';
- return $this->labelstatut[$statut];
+ return $this->labelstatutshort[$statut];
}
if ($mode == 2)
{
- $prefix='Short';
- if ($statut == 0) return img_picto($this->labelstatut[$statut],'statut0').' '.$this->labelstatut[$statut];
- if ($statut == 1) return img_picto($this->labelstatut[$statut],'statut1').' '.$this->labelstatut[$statut];
- if ($statut == 2) return img_picto($this->labelstatut[$statut],'statut6').' '.$this->labelstatut[$statut];
+ if ($statut == 0) return img_picto($this->labelstatut[$statut],'statut0').' '.$this->labelstatutshort[$statut];
+ if ($statut == 1) return img_picto($this->labelstatut[$statut],'statut1').' '.$this->labelstatutshort[$statut];
+ if ($statut == 2) return img_picto($this->labelstatut[$statut],'statut6').' '.$this->labelstatutshort[$statut];
}
if ($mode == 3)
{
@@ -129,9 +129,9 @@ class Don
if ($mode == 5)
{
$prefix='Short';
- if ($statut == 0) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut0');
- if ($statut == 1) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut1');
- if ($statut == 2) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut6');
+ if ($statut == 0) return $this->labelstatutshort[$statut].' '.img_picto($this->labelstatut[$statut],'statut0');
+ if ($statut == 1) return $this->labelstatutshort[$statut].' '.img_picto($this->labelstatut[$statut],'statut1');
+ if ($statut == 2) return $this->labelstatutshort[$statut].' '.img_picto($this->labelstatut[$statut],'statut6');
}
}
diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php
index 1c622e3e08d..bbbb6afc1a5 100644
--- a/htdocs/expedition/fiche.php
+++ b/htdocs/expedition/fiche.php
@@ -583,7 +583,7 @@ else
//$genallowed=1;
//$delallowed=0;
- $result=$html->show_documents('expedition',$expeditionref,$filedir,$urlsource,$genallowed,$delallowed,$expedition->modelpdf);
+ $somethingshown=$html->show_documents('expedition',$expeditionref,$filedir,$urlsource,$genallowed,$delallowed,$expedition->modelpdf);
/*
* Déjà livre
diff --git a/htdocs/expedition/mods/pdf/pdf_expedition_dorade.modules.php b/htdocs/expedition/mods/pdf/pdf_expedition_dorade.modules.php
index 0e830b7b6bd..8d4ad762525 100644
--- a/htdocs/expedition/mods/pdf/pdf_expedition_dorade.modules.php
+++ b/htdocs/expedition/mods/pdf/pdf_expedition_dorade.modules.php
@@ -22,14 +22,34 @@
* $Source$
*/
+/**
+ \file htdocs/expedition/mods/pdf/pdf_expedition_dorade.modules.php
+ \ingroup expedition
+ \brief Fichier de la classe permettant de générer les bordereaux envoi au modèle Dorade
+ \version $Revision$
+*/
+
require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/ModelePdfExpedition.class.php";
+/**
+ \class pdf_expedition_dorade
+ \brief Classe permettant de générer les borderaux envoi au modèle Dorade
+*/
+
Class pdf_expedition_dorade extends ModelePdfExpedition
{
+ var $emetteur; // Objet societe qui emet
+
+ /**
+ \brief Constructeur
+ \param db Handler accès base de donnée
+ */
function pdf_expedition_dorade($db=0)
{
+ global $conf,$langs,$mysoc;
+
$this->db = $db;
$this->name = "dorade";
$this->description = "Modèle identique au rouget utilisé pour debug uniquement.";
@@ -40,6 +60,10 @@ Class pdf_expedition_dorade extends ModelePdfExpedition
$this->format = array($this->page_largeur,$this->page_hauteur);
$this->option_logo = 0;
+
+ // 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
}
@@ -87,7 +111,7 @@ Class pdf_expedition_dorade extends ModelePdfExpedition
function generate(&$objExpe, $filename, $outputlangs='')
{
- global $user,$conf,$langs,$mysoc;
+ global $user,$conf,$langs;
if (! is_object($outputlangs)) $outputlangs=$langs;
$outputlangs->load("main");
@@ -98,70 +122,92 @@ Class pdf_expedition_dorade extends ModelePdfExpedition
$outputlangs->setPhpLang();
- $this->expe = $objExpe;
-
- $this->expe->fetch_commande();
-
- // Définition de $dir et $file
- if ($this->expe->specimen)
+ if ($conf->expedition->dir_output)
{
- $dir = $conf->propal->dir_output;
- $file = $dir . "/SPECIMEN.pdf";
- }
- else
- {
- $expref = sanitize_string($this->expe->ref);
- $dir = $conf->expedition->dir_output . "/" . $expref;
- $file = $dir . "/" . $expref . ".pdf";
- }
+ $this->expe = $objExpe;
+ $this->expe->fetch_commande();
- if (! file_exists($dir))
- {
- if (create_exdir($dir) < 0)
+ // Définition de $dir et $file
+ if ($this->expe->specimen)
{
- $this->error=$outputlangs->trans("ErrorCanNotCreateDir",$dir);
- return 0;
+ $dir = $conf->expedition->dir_output;
+ $file = $dir . "/SPECIMEN.pdf";
+ }
+ else
+ {
+ $expref = sanitize_string($this->expe->ref);
+ $dir = $conf->expedition->dir_output . "/" . $expref;
+ $file = $dir . "/" . $expref . ".pdf";
}
- }
-
- $filename=$file;
-
- $this->pdf = new ModelePdfExpedition();
- $this->pdf->expe = &$this->expe;
- $this->pdf->Open();
- $this->pdf->AliasNbPages();
- $this->pdf->AddPage();
+ if (! file_exists($dir))
+ {
+ if (create_exdir($dir) < 0)
+ {
+ $this->error=$outputlangs->trans("ErrorCanNotCreateDir",$dir);
+ return 0;
+ }
+ }
- $this->pdf->SetTitle($objExpe->ref);
- $this->pdf->SetSubject("Bordereau d'expedition");
- $this->pdf->SetCreator("Dolibarr ".DOL_VERSION);
- //$this->pdf->SetAuthor($user->fullname);
-
- /*
- *
- */
- $this->pdf->SetTextColor(0,0,0);
- $this->pdf->SetFont('Arial','', 16);
-
- $this->expe->fetch_lignes();
-
- for ($i = 0 ; $i < sizeof($this->expe->lignes) ; $i++)
- {
- $a = $this->pdf->tableau_top + 14 + ($i * 16);
-
- $this->pdf->i25(8, ($a - 2), "000000".$this->expe->lignes[$i]->fk_product, 1, 8);
-
- $this->pdf->Text(40, $a, $this->expe->lignes[$i]->description);
-
- $this->pdf->Text(170, $a, $this->expe->lignes[$i]->qty_commande);
-
- $this->pdf->Text(194, $a, $this->expe->lignes[$i]->qty_expedition);
- }
-
- $this->pdf->Output($filename);
+ if (file_exists($dir))
+ {
+ $filename=$file;
+
+ $this->pdf = new ModelePdfExpedition();
+ $this->pdf->expe = &$this->expe;
+
+ $this->pdf->Open();
+ $this->pdf->AliasNbPages();
+ $this->pdf->AddPage();
+
+ $this->pdf->SetTitle($objExpe->ref);
+ $this->pdf->SetSubject("Bordereau d'expedition");
+ $this->pdf->SetCreator("Dolibarr ".DOL_VERSION);
+ //$this->pdf->SetAuthor($user->fullname);
+
+ /*
+ *
+ */
+ $this->pdf->SetTextColor(0,0,0);
+ $this->pdf->SetFont('Arial','', 16);
+
+ $this->expe->fetch_lignes();
+
+ for ($i = 0 ; $i < sizeof($this->expe->lignes) ; $i++)
+ {
+ $a = $this->pdf->tableau_top + 14 + ($i * 16);
+
+ $this->pdf->i25(8, ($a - 2), "000000".$this->expe->lignes[$i]->fk_product, 1, 8);
+
+ $this->pdf->Text(40, $a, $this->expe->lignes[$i]->description);
+
+ $this->pdf->Text(170, $a, $this->expe->lignes[$i]->qty_commande);
+
+ $this->pdf->Text(194, $a, $this->expe->lignes[$i]->qty_expedition);
+ }
+
+ $this->pdf->Output($filename);
+
+ $langs->setPhpLang(); // On restaure langue session
+ return 1;
+ }
+ else
+ {
+ $this->error=$outputlangs->trans("ErrorCanNotCreateDir",$dir);
+ $langs->setPhpLang(); // On restaure langue session
+ return 0;
+ }
+ }
+ else
+ {
+ $this->error=$outputlangs->trans("ErrorConstantNotDefined","EXP_OUTPUTDIR");
+ $langs->setPhpLang(); // On restaure langue session
+ return 0;
+ }
+ $this->error=$outputlangs->trans("ErrorUnknown");
+ $langs->setPhpLang(); // On restaure langue session
+ return 0; // Erreur par defaut
- return 1;
}
}
?>
diff --git a/htdocs/expedition/mods/pdf/pdf_expedition_merou.modules.php b/htdocs/expedition/mods/pdf/pdf_expedition_merou.modules.php
index 7a78bd60bec..baacab0a024 100644
--- a/htdocs/expedition/mods/pdf/pdf_expedition_merou.modules.php
+++ b/htdocs/expedition/mods/pdf/pdf_expedition_merou.modules.php
@@ -1,7 +1,7 @@
- * Copyright (C) 2005 Laurent Destailleur
- * Copyright (C) 2005 Regis Houssin
+/* Copyright (C) 2005 Rodolphe Quiedeville
+ * Copyright (C) 2005-2006 Laurent Destailleur
+ * Copyright (C) 2005 Regis Houssin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,14 +22,34 @@
* $Source$
*/
+/**
+ \file htdocs/expedition/mods/pdf/pdf_expedition_dorade.modules.php
+ \ingroup expedition
+ \brief Fichier de la classe permettant de générer les bordereaux envoi au modèle Merou
+ \version $Revision$
+*/
+
require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/ModelePdfExpedition.class.php";
require_once DOL_DOCUMENT_ROOT."/contact.class.php";
+/**
+ \class pdf_expedition_dorade
+ \brief Classe permettant de générer les borderaux envoi au modèle Merou
+*/
+
Class pdf_expedition_merou extends ModelePdfExpedition
{
+ var $emetteur; // Objet societe qui emet
+
+ /**
+ \brief Constructeur
+ \param db Handler accès base de donnée
+ */
function pdf_expedition_merou($db=0)
{
+ global $conf,$langs,$mysoc;
+
$this->db = $db;
$this->name = "Merou";
$this->description = "Modele Merou 2xA5 \n
@@ -46,15 +66,20 @@ Class pdf_expedition_merou extends ModelePdfExpedition
$this->format = array($this->page_largeur,$this->page_hauteur);
$this->option_logo = 1; // Affiche logo
+
+ // 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
}
+
//*****************************
//Creation du Document
//Initialisation des données
//*****************************
function generate(&$objExpe, $file, $outputlangs='')
{
- global $user,$conf,$langs,$mysoc;
+ global $user,$conf,$langs;
if (! is_object($outputlangs)) $outputlangs=$langs;
$outputlangs->load("main");
@@ -65,51 +90,54 @@ Class pdf_expedition_merou extends ModelePdfExpedition
$outputlangs->setPhpLang();
- //Initialisation des langues
- $langs->load("main");
- $langs->load("bills");
- $langs->load("products");
//Generation de la fiche
$this->expe = $objExpe;
$this->expe->fetch_commande();
- //Creation du Client
- $soc = new Societe($this->db);
- $soc->fetch($this->expe->commande->socidp);
-
- //Creation de l expediteur
- $this->expediteur = $soc;
- //Creation du destinataire
- $this->destinataire = new Contact($this->db);
-// $pdf->expe->commande->fetch($pdf->commande->id);
-//print_r($pdf->expe);
- $idcontact = $this->expe->commande->getIdContact('external','DESTINATAIRE');
- $this->destinataire->fetch($idcontact[0]);
-
- //Creation du livreur
- $idcontact = $this->expe->commande->getIdContact('internal','LIVREUR');
- $this->livreur = new User($this->db,$idcontact[0]);
- if ($idcontact[0]) $this->livreur->fetch();
-
//Verification de la configuration
if ($conf->expedition->dir_output)
{
- $expeditionref = sanitize_string($this->expe->ref);
- $dir = $conf->expedition->dir_output . "/" . $expeditionref;
- $file = $dir . "/" . $expeditionref . ".pdf";
+ //Creation du Client
+ $soc = new Societe($this->db);
+ $soc->fetch($this->expe->commande->socidp);
+
+ //Creation de l expediteur
+ $this->expediteur = $soc;
+ //Creation du destinataire
+ $this->destinataire = new Contact($this->db);
+ // $pdf->expe->commande->fetch($pdf->commande->id);
+ //print_r($pdf->expe);
+ $idcontact = $this->expe->commande->getIdContact('external','DESTINATAIRE');
+ $this->destinataire->fetch($idcontact[0]);
+
+ //Creation du livreur
+ $idcontact = $this->expe->commande->getIdContact('internal','LIVREUR');
+ $this->livreur = new User($this->db,$idcontact[0]);
+ if ($idcontact[0]) $this->livreur->fetch();
+
- //Si le dossier n existe pas
- if (! file_exists($dir))
- {
- umask(0);
-
- //On tente de le creer
- if (! mkdir($dir, 0755))
- {
- $pdf->error=$langs->trans("ErrorCanNotCreateDir",$dir);
- return 0;
- }
- }
+ // Définition de $dir et $file
+ if ($this->expe->specimen)
+ {
+ $dir = $conf->expedition->dir_output;
+ $file = $dir . "/SPECIMEN.pdf";
+ }
+ else
+ {
+ $expref = sanitize_string($this->expe->ref);
+ $dir = $conf->expedition->dir_output . "/" . $expref;
+ $file = $dir . "/" . $expref . ".pdf";
+ }
+
+ if (! file_exists($dir))
+ {
+ if (create_exdir($dir) < 0)
+ {
+ $this->error=$outputlangs->trans("ErrorCanNotCreateDir",$dir);
+ return 0;
+ }
+ }
+
//Si le dossier existe
if (file_exists($dir))
{
@@ -179,16 +207,34 @@ Class pdf_expedition_merou extends ModelePdfExpedition
$pdf->SetFont('Arial','', 7);
}
}
- //Insertio ndu pied de page
- $this->_pagefoot($pdf);
- $pdf->AliasNbPages();
- //Cloture du pdf
- $pdf->Close();
- //Ecriture du pdf
- $pdf->Output($file);
- return 1;
+ //Insertion du pied de page
+ $this->_pagefoot($pdf);
+ $pdf->AliasNbPages();
+ //Cloture du pdf
+ $pdf->Close();
+ //Ecriture du pdf
+ $pdf->Output($file);
+
+ $langs->setPhpLang(); // On restaure langue session
+ return 1;
}
+ else
+ {
+ $this->error=$outputlangs->trans("ErrorCanNotCreateDir",$dir);
+ $langs->setPhpLang(); // On restaure langue session
+ return 0;
+ }
}
+ else
+ {
+ $this->error=$outputlangs->trans("ErrorConstantNotDefined","EXP_OUTPUTDIR");
+ $langs->setPhpLang(); // On restaure langue session
+ return 0;
+ }
+ $this->error=$outputlangs->trans("ErrorUnknown");
+ $langs->setPhpLang(); // On restaure langue session
+ return 0; // Erreur par defaut
+
}
//********************************
@@ -239,7 +285,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
//********************************
function _pagehead(&$pdf, $exp)
{
- global $conf, $langs, $mysoc;
+ global $conf, $langs;
$tab4_top = 60;
$tab4_hl = 6;
@@ -247,8 +293,8 @@ Class pdf_expedition_merou extends ModelePdfExpedition
$ligne = 2;
//*********************LOGO****************************
- $logo=$conf->societe->dir_logos.'/'.$mysoc->logo;
- if ($mysoc->logo)
+ $logo=$conf->societe->dir_logos.'/'.$this->emetteur->logo;
+ if ($this->emetteur->logo)
{
if (is_readable($logo))
{
diff --git a/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php b/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php
index 807b7cfd4f0..56d4fe8bfcb 100644
--- a/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php
+++ b/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php
@@ -21,14 +21,34 @@
* $Source$
*/
+/**
+ \file htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php
+ \ingroup expedition
+ \brief Fichier de la classe permettant de générer les bordereaux envoi au modèle Rouget
+ \version $Revision$
+*/
+
require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/ModelePdfExpedition.class.php";
+/**
+ \class pdf_expedition_dorade
+ \brief Classe permettant de générer les borderaux envoi au modèle Rouget
+*/
+
Class pdf_expedition_rouget extends ModelePdfExpedition
{
+ var $emetteur; // Objet societe qui emet
+
+ /**
+ \brief Constructeur
+ \param db Handler accès base de donnée
+ */
function pdf_expedition_rouget($db=0)
{
+ global $conf,$langs,$mysoc;
+
$this->db = $db;
$this->name = "rouget";
$this->description = "Modèle simple.";
@@ -39,6 +59,10 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
$this->format = array($this->page_largeur,$this->page_hauteur);
$this->option_logo = 0;
+
+ // 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
}
function Header()
@@ -68,7 +92,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
function generate(&$objExpe, $filename, $outputlangs='')
{
- global $user,$conf,$langs,$mysoc;
+ global $user,$conf,$langs;
if (! is_object($outputlangs)) $outputlangs=$langs;
$outputlangs->load("main");
@@ -79,43 +103,87 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
$outputlangs->setPhpLang();
- $this->expe = $objExpe;
-
- $this->pdf = new FPDF();
- $this->pdf->expe = &$this->expe;
-
- $this->pdf->Open();
- $this->pdf->AliasNbPages();
- $this->pdf->AddPage();
-
- $this->pdf->SetTitle($objExpe->ref);
- $this->pdf->SetSubject($langs->trans("Sending"));
- $this->pdf->SetCreator("Dolibarr ".DOL_VERSION);
- //$this->pdf->SetAuthor($user->fullname);
-
- /*
- *
- */
-
- $this->pdf->SetTextColor(0,0,0);
- $this->pdf->SetFont('Arial','', 14);
-
- $this->expe->fetch_lignes();
-
- for ($i = 0 ; $i < sizeof($this->expe->lignes) ; $i++)
+ if ($conf->expedition->dir_output)
{
- $a = $this->pdf->tableau_top + 14 + ($i * 7);
-
- $this->pdf->Text(8, $a, $this->expe->lignes[$i]->description);
-
- $this->pdf->Text(170, $a, $this->expe->lignes[$i]->qty_commande);
-
- $this->pdf->Text(194, $a, $this->expe->lignes[$i]->qty_expedition);
- }
-
- $this->pdf->Output($filename);
+ $this->expe = $objExpe;
- return 1;
+ // Définition de $dir et $file
+ if ($this->expe->specimen)
+ {
+ $dir = $conf->expedition->dir_output;
+ $file = $dir . "/SPECIMEN.pdf";
+ }
+ else
+ {
+ $expref = sanitize_string($this->expe->ref);
+ $dir = $conf->expedition->dir_output . "/" . $expref;
+ $file = $dir . "/" . $expref . ".pdf";
+ }
+
+ if (! file_exists($dir))
+ {
+ if (create_exdir($dir) < 0)
+ {
+ $this->error=$outputlangs->trans("ErrorCanNotCreateDir",$dir);
+ return 0;
+ }
+ }
+
+ if (file_exists($dir))
+ {
+ $this->pdf = new FPDF();
+ $this->pdf->expe = &$this->expe;
+
+ $this->pdf->Open();
+ $this->pdf->AliasNbPages();
+ $this->pdf->AddPage();
+
+ $this->pdf->SetTitle($objExpe->ref);
+ $this->pdf->SetSubject($langs->trans("Sending"));
+ $this->pdf->SetCreator("Dolibarr ".DOL_VERSION);
+ //$this->pdf->SetAuthor($user->fullname);
+
+ /*
+ *
+ */
+
+ $this->pdf->SetTextColor(0,0,0);
+ $this->pdf->SetFont('Arial','', 14);
+
+ $this->expe->fetch_lignes();
+
+ for ($i = 0 ; $i < sizeof($this->expe->lignes) ; $i++)
+ {
+ $a = $this->pdf->tableau_top + 14 + ($i * 7);
+
+ $this->pdf->Text(8, $a, $this->expe->lignes[$i]->description);
+
+ $this->pdf->Text(170, $a, $this->expe->lignes[$i]->qty_commande);
+
+ $this->pdf->Text(194, $a, $this->expe->lignes[$i]->qty_expedition);
+ }
+
+ $this->pdf->Output($filename);
+
+ $langs->setPhpLang(); // On restaure langue session
+ return 1;
+ }
+ else
+ {
+ $this->error=$outputlangs->trans("ErrorCanNotCreateDir",$dir);
+ $langs->setPhpLang(); // On restaure langue session
+ return 0;
+ }
+ }
+ else
+ {
+ $this->error=$outputlangs->trans("ErrorConstantNotDefined","EXP_OUTPUTDIR");
+ $langs->setPhpLang(); // On restaure langue session
+ return 0;
+ }
+ $this->error=$outputlangs->trans("ErrorUnknown");
+ $langs->setPhpLang(); // On restaure langue session
+ return 0; // Erreur par defaut
}
}
diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php
index fe121423692..c9f78eeffe1 100644
--- a/htdocs/exports/export.php
+++ b/htdocs/exports/export.php
@@ -117,7 +117,7 @@ if ($step == 1 || $action == 'cleanselect')
if ($action == 'builddoc')
{
// Genère le fichier
- $result=$objexport->build_file($user, $_POST["model"], $datatoexport, $array_selected);
+ $result=$objexport->build_file($user, $_POST['model'], $datatoexport, $array_selected);
if ($result < 0)
{
$mesg='
'.$objexport->error.'
';
diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php
index 9268b25c88f..44d4a55daf5 100644
--- a/htdocs/fichinter/fiche.php
+++ b/htdocs/fichinter/fiche.php
@@ -126,7 +126,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
llxHeader();
-$sel = new Form($db);
+$html = new Form($db);
/*
*
@@ -176,7 +176,7 @@ if ($_GET["action"] == 'create')
print "