Nouveau format des modules

This commit is contained in:
Rodolphe Quiedeville 2003-11-13 15:07:42 +00:00
parent 7cd24d31f4
commit 8f096cd1a7
3 changed files with 33 additions and 16 deletions

View File

@ -20,9 +20,9 @@
* *
*/ */
include_once "modDolibarrModules.class.php"; include_once "DolibarrModules.class.php";
class modCommande extends modDolibarrModules class modCommande extends DolibarrModules
{ {
/* /*
@ -33,6 +33,12 @@ class modCommande extends modDolibarrModules
Function modCommande($DB) Function modCommande($DB)
{ {
$this->db = $DB ; $this->db = $DB ;
$this->numero = 25 ;
$this->name = "Commande";
$this->description = "Gestion des commandes";
$this->const_name = "MAIN_MODULE_COMMANDE";
$this->const_config = MAIN_MODULE_COMMANDE;
$this->const = array(); $this->const = array();
$this->boxes = array(); $this->boxes = array();
$this->config_page_url = "commande.php"; $this->config_page_url = "commande.php";
@ -56,8 +62,6 @@ class modCommande extends modDolibarrModules
"insert into llx_rights_def values (82,'Créer modifier les commandes','commande','w',0);", "insert into llx_rights_def values (82,'Créer modifier les commandes','commande','w',0);",
//"insert into llx_rights_def values (83,'Modifier les commandes d\'autrui','commande','m',0);", //"insert into llx_rights_def values (83,'Modifier les commandes d\'autrui','commande','m',0);",
"insert into llx_rights_def values (84,'Valider les commandes','commande','d',0);", "insert into llx_rights_def values (84,'Valider les commandes','commande','d',0);",
"insert into llx_rights_def values (85,'Envoyer les commandes aux clients','commande','d',0);",
"insert into llx_rights_def values (86,'Emettre des paiements sur les commandes','commande','d',0);",
"insert into llx_rights_def values (89,'Supprimer les commandes','commande','d',0);", "insert into llx_rights_def values (89,'Supprimer les commandes','commande','d',0);",
); );

View File

@ -20,9 +20,9 @@
* *
*/ */
include_once "modDolibarrModules.class.php"; include_once "DolibarrModules.class.php";
class modExpedition extends modDolibarrModules class modExpedition extends DolibarrModules
{ {
/* /*
@ -33,6 +33,12 @@ class modExpedition extends modDolibarrModules
Function modExpedition($DB) Function modExpedition($DB)
{ {
$this->db = $DB ; $this->db = $DB ;
$this->numero = 80 ;
$this->name = "Expedition";
$this->description = "Gestion des expéditions";
$this->const_name = "MAIN_MODULE_EXPEDITION";
$this->const_config = MAIN_MODULE_EXPEDITION;
$this->const = array(); $this->const = array();
$this->boxes = array(); $this->boxes = array();
} }

View File

@ -19,8 +19,9 @@
* $Source$ * $Source$
* *
*/ */
include_once "DolibarrModules.class.php";
class modFicheinter class modFicheinter extends DolibarrModules
{ {
/* /*
@ -31,8 +32,19 @@ class modFicheinter
Function modFicheinter($DB) Function modFicheinter($DB)
{ {
$this->db = $DB ; $this->db = $DB ;
$this->depends = array("MAIN_MODULE_SOCIETE"); $this->numero = 70 ;
$this->name = "Fiche d'intervention";
$this->description = "Gestion des fiches d'intervention";
$this->const_name = "MAIN_MODULE_FICHEINTER";
$this->const_config = MAIN_MODULE_FICHEINTER;
$this->depends = array("modSociete");
$this->config_page_url = "fichinter.php"; $this->config_page_url = "fichinter.php";
$this->depends = array();
$this->const = array();
$this->boxes = array();
} }
/* /*
* *
@ -55,13 +67,8 @@ class modFicheinter
"INSERT INTO llx_rights_def VALUES (62,'Créer modifier les fiches d\'intervention','ficheinter','w',0);", "INSERT INTO llx_rights_def VALUES (62,'Créer modifier les fiches d\'intervention','ficheinter','w',0);",
"INSERT INTO llx_rights_def VALUES (64,'Supprimer les fiches d\'intervention','ficheinter','d',0);" "INSERT INTO llx_rights_def VALUES (64,'Supprimer les fiches d\'intervention','ficheinter','d',0);"
); );
//"INSERT INTO llx_rights_def VALUES (63,'Modifier les fiches d\'intervention d\'autrui','ficheinter','m',0);",
for ($i = 0 ; $i < sizeof($sql) ; $i++)
{
$this->db->query($sql[$i]);
}
return $this->_init($sql);
} }
/* /*
* *
@ -69,9 +76,9 @@ class modFicheinter
*/ */
Function remove() Function remove()
{ {
$sql = "DELETE FROM llx_rights_def WHERE module = 'ficheinter';"; $sql = array("DELETE FROM llx_rights_def WHERE module = 'ficheinter';");
$this->db->query($sql);
return $this->_remove($sql);
} }
} }
?> ?>