From 5cc501540f821b79635d8281b76dd67b770d2486 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 25 Aug 2005 19:58:01 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20L'initialisation=20du=20tableau=20de=20d?= =?UTF-8?q?roits=20doit=20etre=20dans=20le=20constructeur=20de=20mani=E8re?= =?UTF-8?q?=20a=20etre=20d=E9fini=20dans=20toutes=20les=20methodes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../includes/modules/modCommercial.class.php | 140 +++++++++--------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/htdocs/includes/modules/modCommercial.class.php b/htdocs/includes/modules/modCommercial.class.php index a94ead88a30..af618bcc301 100644 --- a/htdocs/includes/modules/modCommercial.class.php +++ b/htdocs/includes/modules/modCommercial.class.php @@ -46,78 +46,78 @@ class modCommercial extends DolibarrModules * \brief Constructeur. Definit les noms, constantes et boites * \param DB handler d'accès base */ - function modCommercial($DB) - { - $this->db = $DB ; - $this->numero = 2 ; + function modCommercial($DB) + { + $this->db = $DB ; + $this->numero = 2 ; + + $this->family = "crm"; + $this->name = "Commercial"; + $this->description = "Gestion commercial"; + + $this->revision = explode(" ","$Revision$"); + $this->version = $this->revision[1]; + + $this->const_name = "MAIN_MODULE_COMMERCIAL"; + $this->const_config = MAIN_MODULE_COMMERCIAL; + $this->special = 0; + $this->picto='commercial'; + + // Dir + $this->dirs = array(); + + // Dépendances + $this->depends = array("modSociete"); + $this->requiredby = array("modPropale","modContrat","modCommande",); + + // Constantes + $this->const = array(); + + // Boxes + $this->boxes = array(); + $this->boxes[0][0] = "Derniers clients"; + $this->boxes[0][1] = "box_clients.php"; + $this->boxes[1][0] = "Derniers prospects enregistrés"; + $this->boxes[1][1] = "box_prospect.php"; + + // Permissions + $this->rights = array(); + $this->rights_class = 'commercial'; + $r = 1; + + // 261 : Permission générale + $this->rights[$r][0] = 261; + $this->rights[$r][1] = 'Informations commerciales'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'main'; + $this->rights[$r][5] = 'lire'; + $r++; + } - $this->family = "crm"; - $this->name = "Commercial"; - $this->description = "Gestion commercial"; + /** + * \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module. + * Définit également les répertoires de données à créer pour ce module. + */ + function init() + { + // Permissions + $this->remove(); + + $sql = array(); - $this->revision = explode(" ","$Revision$"); - $this->version = $this->revision[1]; - - $this->const_name = "MAIN_MODULE_COMMERCIAL"; - $this->const_config = MAIN_MODULE_COMMERCIAL; - $this->special = 0; - $this->picto='commercial'; - - // Dir - $this->dirs = array(); - - // Dépendances - $this->depends = array("modSociete"); - $this->requiredby = array("modPropale","modContrat","modCommande",); - - // Constantes - $this->const = array(); - - // Boxes - $this->boxes = array(); - $this->boxes[0][0] = "Derniers clients"; - $this->boxes[0][1] = "box_clients.php"; - $this->boxes[1][0] = "Derniers prospects enregistrés"; - $this->boxes[1][1] = "box_prospect.php"; - - // Permissions - $this->rights = array(); - $this->rights_class = 'commercial'; - } - - /** - * \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module. - * Définit également les répertoires de données à créer pour ce module. - */ - function init() - { - $sql = array(); - - // Permissions - $this->remove(); - $r = 1; - - // 261 : Permission générale - $this->rights[$r][0] = 261; - $this->rights[$r][1] = 'Informations commerciales'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'main'; - $this->rights[$r][5] = 'lire'; - $r++; - - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appelée lors de la désactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } + /** + * \brief Fonction appelée lors de la désactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?>