From 2836db8da95608149357e9c743ba6e6145f8240c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Jun 2006 20:14:21 +0000 Subject: [PATCH] Fix: Requete init --- htdocs/includes/modules/DolibarrModules.class.php | 5 ++++- htdocs/includes/modules/modCommande.class.php | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php index e87bccacb3e..8c3d95905b8 100644 --- a/htdocs/includes/modules/DolibarrModules.class.php +++ b/htdocs/includes/modules/DolibarrModules.class.php @@ -102,8 +102,11 @@ class DolibarrModules // Exécute les requetes sql complémentaires for ($i = 0 ; $i < sizeof($array_sql) ; $i++) { - if (! $this->db->query($array_sql[$i])) + $sql=$array_sql[$i]; + $result=$this->db->query($sql); + if (! $result) { + dolibarr_syslog("Error sql=".$sql." - ".$this->db->error()); $err++; } } diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php index 6f04b9414bc..42a35a1b19b 100644 --- a/htdocs/includes/modules/modCommande.class.php +++ b/htdocs/includes/modules/modCommande.class.php @@ -73,15 +73,15 @@ class modCommande extends DolibarrModules // Constantes $this->const = array(); - $this->const[0][0] = "COMMANDE_ADDON_PDF"; + $this->const[0][0] = "COMMANDE_ADDON_PDF"; $this->const[0][1] = "chaine"; - $this->const[0][2] = "azur"; + $this->const[0][2] = "einstein"; $this->const[0][3] = 'Nom du gestionnaire de génération des commandes en PDF'; $this->const[0][4] = 0; $this->const[1][0] = "COMMANDE_ADDON"; $this->const[1][1] = "chaine"; - $this->const[1][2] = "mod_commande_jade"; + $this->const[1][2] = "mod_commande_marbre"; $this->const[1][3] = 'Nom du gestionnaire de numérotation des commandes'; $this->const[1][4] = 0; @@ -160,8 +160,8 @@ class modCommande extends DolibarrModules $this->dirs[0] = $conf->commande->dir_output; $this->dirs[1] = $conf->commande->dir_images; $sql = array( - "DELETE FROM ".MAIN_DB_PREFIX."commande_model_pdf WHERE nom = '".$this->const[0][2]."'", - "INSERT INTO ".MAIN_DB_PREFIX."commande_model_pdf (nom) VALUES('".$this->const[0][2]."');", + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."'", + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom,type) VALUES('".$this->const[0][2]."','order')" ); return $this->_init($sql);