diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php
index 18f8b14a432..3fbc74ebfcb 100644
--- a/htdocs/admin/triggers.php
+++ b/htdocs/admin/triggers.php
@@ -164,33 +164,33 @@ foreach ($orders as $key => $value)
}
$const_name = $objMod->const_name;
- $const_value = $objMod->const_config;
- $var=!$var;
-
- print "
\n";
-
- print '| ';
- print $objMod->picto?img_object('',$objMod->picto):img_object('','generic');
- print ' | '.$files[$key];
- print " | \n ";
- print $objMod->getDesc();
- print " | \n ";
- print $objMod->getVersion();
- print " | \n ";
-
- $const_value=1;
-
- if ($const_value == 1)
- {
- print img_tick();
- }
- else
- {
- print " ";
- }
-
- print " | \n";
+ $var=!$var;
+
+ print "
\n";
+
+ print '| ';
+ print $objMod->picto?img_object('',$objMod->picto):img_object('','generic');
+ print ' | '.$files[$key];
+ print " | \n ";
+ print $objMod->getDesc();
+ print " | \n ";
+ print $objMod->getVersion();
+ print " | \n ";
+
+ // \todo Activation trigger
+ $statut_trigger=1;
+
+ if ($statut_trigger == 1)
+ {
+ print img_tick();
+ }
+ else
+ {
+ print " ";
+ }
+
+ print " | \n";
/*
print "";
@@ -205,8 +205,8 @@ foreach ($orders as $key => $value)
print "numero."&action=set&value=" . $modName . "&spe=" . $_GET["spe"] . "\">" . $langs->trans("Activate") . " | \n";
}
*/
- print " | \n";
- print "
\n";
+ print " | \n";
+ print "\n";
}
print "\n";
diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php
index 18a3ad7e64c..26e910960ab 100644
--- a/htdocs/includes/modules/DolibarrModules.class.php
+++ b/htdocs/includes/modules/DolibarrModules.class.php
@@ -21,7 +21,6 @@
*
* $Id$
* $Source$
- *
*/
/**
@@ -64,7 +63,8 @@ class DolibarrModules
function _init($array_sql)
{
global $langs;
-
+ $err='';
+
// Insère une entrée dans llx_dolibarr_modules
$err+=$this->_dbactive();
diff --git a/htdocs/includes/modules/modAdherent.class.php b/htdocs/includes/modules/modAdherent.class.php
index 225d6d5590a..95ee4aa1a25 100644
--- a/htdocs/includes/modules/modAdherent.class.php
+++ b/htdocs/includes/modules/modAdherent.class.php
@@ -57,8 +57,7 @@ class modAdherent extends DolibarrModules
$this->name = "Adhérents";
$this->description = "Gestion des adhérents d'une association";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_ADHERENT";
- $this->const_config = MAIN_MODULE_ADHERENT;
+ $this->const_name = 'MAIN_MODULE_ADHERENT';
$this->special = 1;
$this->picto='user';
diff --git a/htdocs/includes/modules/modBanque.class.php b/htdocs/includes/modules/modBanque.class.php
index 52217e02318..8f91354304b 100644
--- a/htdocs/includes/modules/modBanque.class.php
+++ b/htdocs/includes/modules/modBanque.class.php
@@ -54,11 +54,10 @@ class modBanque extends DolibarrModules
$this->name = "Banque";
$this->description = "Gestion des comptes financiers de type Comptes bancaires ou postaux";
- $this->revision = explode(" ","$Revision$");
+ $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_BANQUE";
- $this->const_config = MAIN_MODULE_BANQUE;
+ $this->const_name = 'MAIN_MODULE_BANQUE';
$this->picto='account';
// Dépendances
@@ -79,25 +78,28 @@ class modBanque extends DolibarrModules
// Permissions
$this->rights = array();
$this->rights_class = 'banque';
+ $r=0;
+
+ $r++;
+ $this->rights[$r][0] = 111; // id de la permission
+ $this->rights[$r][1] = 'Lire les comptes bancaires'; // libelle de la permission
+ $this->rights[$r][2] = 'a'; // type de la permission (déprécié à ce jour)
+ $this->rights[$r][3] = 1; // La permission est-elle une permission par défaut
+ $this->rights[$r][4] = 'lire';
- $this->rights[1][0] = 111; // id de la permission
- $this->rights[1][1] = 'Lire les comptes bancaires'; // libelle de la permission
- $this->rights[1][2] = 'a'; // type de la permission (déprécié à ce jour)
- $this->rights[1][3] = 1; // La permission est-elle une permission par défaut
- $this->rights[1][4] = 'lire';
-
- $this->rights[2][0] = 112; // id de la permission
- $this->rights[2][1] = 'Créer modifier rapprocher transactions'; // libelle de la permission
- $this->rights[2][2] = 'a'; // type de la permission (déprécié à ce jour)
- $this->rights[2][3] = 0; // La permission est-elle une permission par défaut
- $this->rights[2][4] = 'modifier';
-
- $this->rights[3][0] = 113; // id de la permission
- $this->rights[3][1] = 'Configurer les comptes bancaires (créer, gérer catégories)'; // libelle de la permission
- $this->rights[3][2] = 'a'; // type de la permission (déprécié à ce jour)
- $this->rights[3][3] = 0; // La permission est-elle une permission par défaut
- $this->rights[3][4] = 'configurer';
+ $r++;
+ $this->rights[$r][0] = 112; // id de la permission
+ $this->rights[$r][1] = 'Créer modifier rapprocher transactions'; // libelle de la permission
+ $this->rights[$r][2] = 'a'; // type de la permission (déprécié à ce jour)
+ $this->rights[$r][3] = 0; // La permission est-elle une permission par défaut
+ $this->rights[$r][4] = 'modifier';
+ $r++;
+ $this->rights[$r][0] = 113; // id de la permission
+ $this->rights[$r][1] = 'Configurer les comptes bancaires (créer, gérer catégories)'; // libelle de la permission
+ $this->rights[$r][2] = 'a'; // type de la permission (déprécié à ce jour)
+ $this->rights[$r][3] = 0; // La permission est-elle une permission par défaut
+ $this->rights[$r][4] = 'configurer';
}
@@ -105,19 +107,20 @@ class modBanque extends DolibarrModules
* \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();
+ function init()
+ {
+ global $conf;
- $this->dirs[0] = DOL_DATA_ROOT.'/graph/';
- $this->dirs[1] = DOL_DATA_ROOT.'/graph/banque/';
-
-
- return $this->_init($sql);
- }
+ // Permissions
+ $this->remove();
+
+ $sql = array();
+
+ $this->dirs[0] = DOL_DATA_ROOT.'/graph/';
+ $this->dirs[1] = DOL_DATA_ROOT.'/graph/banque/';
+
+ return $this->_init($sql);
+ }
/**
* \brief Fonction appelée lors de la désactivation d'un module.
diff --git a/htdocs/includes/modules/modBarcode.class.php b/htdocs/includes/modules/modBarcode.class.php
index 4847fadb128..fa914654b45 100644
--- a/htdocs/includes/modules/modBarcode.class.php
+++ b/htdocs/includes/modules/modBarcode.class.php
@@ -56,12 +56,11 @@ class modBarcode extends DolibarrModules
$this->name = "Codes barres";
$this->description = "Gestion des codes barres des produits";
- //$this->revision = explode(" ","$Revision$");
+ //$this->revision = explode(' ','$Revision$');
//$this->version = $this->revision[1];
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_BARCODE";
- $this->const_config = MAIN_MODULE_BARCODE;
+ $this->const_name = 'MAIN_MODULE_BARCODE';
$this->special = 0;
$this->picto='barcode';
diff --git a/htdocs/includes/modules/modBookmark.class.php b/htdocs/includes/modules/modBookmark.class.php
index 4b5fcdc5d26..4af652c9844 100644
--- a/htdocs/includes/modules/modBookmark.class.php
+++ b/htdocs/includes/modules/modBookmark.class.php
@@ -53,11 +53,10 @@ class modBookmark extends DolibarrModules
$this->family = "technic";
$this->name = "Bookmarks";
$this->description = "Gestion des Bookmarks";
- $this->revision = explode(" ","$Revision$");
+ $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_BOOKMARK";
- $this->const_config = MAIN_MODULE_BOOKMARK;
+ $this->const_name = 'MAIN_MODULE_BOOKMARK';
$this->special = 1;
$this->picto='bookmark';
diff --git a/htdocs/includes/modules/modBookmark4u.class.php b/htdocs/includes/modules/modBookmark4u.class.php
index 0eaf61bf283..e8068ede600 100644
--- a/htdocs/includes/modules/modBookmark4u.class.php
+++ b/htdocs/includes/modules/modBookmark4u.class.php
@@ -55,8 +55,7 @@ class modBookmark4u extends DolibarrModules
$this->name = "Bookmark4u";
$this->description = "Ajoute fonction pour générer un compte Bookmark4u depuis un compte Dolibarr";
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_BOOKMARK4U";
- $this->const_config = MAIN_MODULE_BOOKMARK4U;
+ $this->const_name = 'MAIN_MODULE_BOOKMARK4U';
$this->special = 1;
$this->picto='user';
diff --git a/htdocs/includes/modules/modBoutique.class.php b/htdocs/includes/modules/modBoutique.class.php
index 745e52b745a..740c0d479cb 100644
--- a/htdocs/includes/modules/modBoutique.class.php
+++ b/htdocs/includes/modules/modBoutique.class.php
@@ -55,8 +55,7 @@ class modBoutique extends DolibarrModules
$this->name = "Boutique";
$this->description = "Gestion des boutiques";
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_BOUTIQUE";
- $this->const_config = MAIN_MODULE_BOUTIQUE;
+ $this->const_name = 'MAIN_MODULE_BOUTIQUE';
$this->special = 1;
// Dir
diff --git a/htdocs/includes/modules/modCategorie.class.php b/htdocs/includes/modules/modCategorie.class.php
index 1147afc9df3..0a9541c1e9a 100644
--- a/htdocs/includes/modules/modCategorie.class.php
+++ b/htdocs/includes/modules/modCategorie.class.php
@@ -51,8 +51,7 @@ class modCategorie extends DolibarrModules
$this->name = "Catégorie";
$this->description = "Gestion des catégories";
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_CATEGORIE";
- $this->const_config = MAIN_MODULE_CATEGORIE;
+ $this->const_name = 'MAIN_MODULE_CATEGORIE';
$this->special = 0;
$this->picto = '';
diff --git a/htdocs/includes/modules/modClickToDial.class.php b/htdocs/includes/modules/modClickToDial.class.php
index fd445fd9686..c4d6fce58d9 100644
--- a/htdocs/includes/modules/modClickToDial.class.php
+++ b/htdocs/includes/modules/modClickToDial.class.php
@@ -55,11 +55,10 @@ class modClickToDial extends DolibarrModules
$this->name = "ClickToDial";
$this->description = "Gestion du Click To Dial";
- $this->revision = explode(" ","$Revision$");
+ $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_CLICKTODIAL";
- $this->const_config = MAIN_MODULE_CLICKTODIAL;
+ $this->const_name = 'MAIN_MODULE_CLICKTODIAL';
$this->special = 1;
$this->picto='phoning';
diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php
index fcab4521743..ac94975e401 100644
--- a/htdocs/includes/modules/modCommande.class.php
+++ b/htdocs/includes/modules/modCommande.class.php
@@ -57,8 +57,7 @@ class modCommande extends DolibarrModules
$this->description = "Gestion des commandes clients";
$this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_COMMANDE";
- $this->const_config = MAIN_MODULE_COMMANDE;
+ $this->const_name = 'MAIN_MODULE_COMMANDE';
$this->special = 0;
$this->picto='order';
diff --git a/htdocs/includes/modules/modCommercial.class.php b/htdocs/includes/modules/modCommercial.class.php
index af618bcc301..4a3638dfb97 100644
--- a/htdocs/includes/modules/modCommercial.class.php
+++ b/htdocs/includes/modules/modCommercial.class.php
@@ -55,11 +55,10 @@ class modCommercial extends DolibarrModules
$this->name = "Commercial";
$this->description = "Gestion commercial";
- $this->revision = explode(" ","$Revision$");
+ $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_COMMERCIAL";
- $this->const_config = MAIN_MODULE_COMMERCIAL;
+ $this->const_name = 'MAIN_MODULE_COMMERCIAL';
$this->special = 0;
$this->picto='commercial';
diff --git a/htdocs/includes/modules/modComptabilite.class.php b/htdocs/includes/modules/modComptabilite.class.php
index aabc7ab5324..c2af2b69d7d 100644
--- a/htdocs/includes/modules/modComptabilite.class.php
+++ b/htdocs/includes/modules/modComptabilite.class.php
@@ -60,8 +60,7 @@ class modComptabilite extends DolibarrModules
$this->revision = explode(" ","$Revision$");
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_COMPTABILITE";
- $this->const_config = MAIN_MODULE_COMPTABILITE;
+ $this->const_name = 'MAIN_MODULE_COMPTABILITE';
// Config pages
$this->config_page_url = "compta.php";
diff --git a/htdocs/includes/modules/modComptabiliteExpert.class.php b/htdocs/includes/modules/modComptabiliteExpert.class.php
index 7a00e1d89cd..b0e8f7295a7 100644
--- a/htdocs/includes/modules/modComptabiliteExpert.class.php
+++ b/htdocs/includes/modules/modComptabiliteExpert.class.php
@@ -58,12 +58,11 @@ class modComptabiliteExpert extends DolibarrModules
$this->name = "ComptabiliteExpert";
$this->description = "Gestion expert de comptabilité (doubles parties)";
-// $this->revision = explode(" ","$Revision$");
+// $this->revision = explode(' ','$Revision$');
// $this->version = $this->revision[1];
$this->version = "development";
- $this->const_name = "MAIN_MODULE_COMPTABILITE_EXPERT";
- $this->const_config = MAIN_MODULE_COMPTABILITE_EXPERT;
+ $this->const_name = 'MAIN_MODULE_COMPTABILITE_EXPERT';
// Config pages
$this->config_page_url = "comptaexpert.php";
diff --git a/htdocs/includes/modules/modContrat.class.php b/htdocs/includes/modules/modContrat.class.php
index 5736011f614..2d2bd5d15ff 100644
--- a/htdocs/includes/modules/modContrat.class.php
+++ b/htdocs/includes/modules/modContrat.class.php
@@ -56,11 +56,10 @@ class modContrat extends DolibarrModules
$this->name = "Contrats";
$this->description = "Gestion des contrats de services";
- $this->revision = explode(" ","$Revision$");
+ $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_CONTRAT";
- $this->const_config = MAIN_MODULE_CONTRAT;
+ $this->const_name = 'MAIN_MODULE_CONTRAT';
$this->special = 0;
$this->picto='contract';
diff --git a/htdocs/includes/modules/modDeplacement.class.php b/htdocs/includes/modules/modDeplacement.class.php
index 9e85a3bf55b..16abfb5c2bd 100644
--- a/htdocs/includes/modules/modDeplacement.class.php
+++ b/htdocs/includes/modules/modDeplacement.class.php
@@ -54,11 +54,10 @@ class modDeplacement extends DolibarrModules
$this->name = "Déplacement"; // Si traduction Module75Name non trouvée
$this->description = "Gestion des déplacements"; // Si traduction Module75Desc non trouvée
- $this->revision = explode(" ","$Revision$");
+ $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_DEPLACEMENT";
- $this->const_config = MAIN_MODULE_DEPLACEMENT;
+ $this->const_name = 'MAIN_MODULE_DEPLACEMENT';
$this->special = 0;
$this->picto = "trip";
diff --git a/htdocs/includes/modules/modDon.class.php b/htdocs/includes/modules/modDon.class.php
index 4d57fabdc90..9565240ec7a 100644
--- a/htdocs/includes/modules/modDon.class.php
+++ b/htdocs/includes/modules/modDon.class.php
@@ -55,8 +55,7 @@ class modDon extends DolibarrModules
$this->name = "Don";
$this->description = "Gestion des dons";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_DON";
- $this->const_config = MAIN_MODULE_DON;
+ $this->const_name = 'MAIN_MODULE_DON';
$this->special = 1;
// Dir
diff --git a/htdocs/includes/modules/modEnergie.class.php b/htdocs/includes/modules/modEnergie.class.php
index 555a7e74b31..d557b986159 100644
--- a/htdocs/includes/modules/modEnergie.class.php
+++ b/htdocs/includes/modules/modEnergie.class.php
@@ -54,11 +54,10 @@ class modEnergie extends DolibarrModules
$this->name = "Energie";
$this->description = "Suivi de la consommation des energies";
- $this->revision = explode(" ","$Revision$");
+ $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_ENERGIE";
- $this->const_config = MAIN_MODULE_ENERGIE;
+ $this->const_name = 'MAIN_MODULE_ENERGIE';
$this->special = 1;
$this->picto='energie';
diff --git a/htdocs/includes/modules/modExpedition.class.php b/htdocs/includes/modules/modExpedition.class.php
index 15b8967ca00..e86f59a7062 100644
--- a/htdocs/includes/modules/modExpedition.class.php
+++ b/htdocs/includes/modules/modExpedition.class.php
@@ -55,8 +55,7 @@ class modExpedition extends DolibarrModules
$this->description = "Gestion des expéditions";
$this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_EXPEDITION";
- $this->const_config = MAIN_MODULE_EXPEDITION;
+ $this->const_name = 'MAIN_MODULE_EXPEDITION';
$this->special = 0;
$this->picto = "sending";
diff --git a/htdocs/includes/modules/modExternalRss.class.php b/htdocs/includes/modules/modExternalRss.class.php
index c7cebfb792e..f21117c48f0 100644
--- a/htdocs/includes/modules/modExternalRss.class.php
+++ b/htdocs/includes/modules/modExternalRss.class.php
@@ -53,8 +53,7 @@ class modExternalRss extends DolibarrModules
$this->name = "Syndication RSS";
$this->description = "Ajout de files d'informations RSS dans les écrans Dolibarr";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_EXTERNALRSS";
- $this->const_config = MAIN_MODULE_EXTERNALRSS;
+ $this->const_name = 'MAIN_MODULE_EXTERNALRSS';
$this->special = 0;
$this->picto='rss';
diff --git a/htdocs/includes/modules/modFacture.class.php b/htdocs/includes/modules/modFacture.class.php
index 9a60bca8ba4..03ea7a45162 100644
--- a/htdocs/includes/modules/modFacture.class.php
+++ b/htdocs/includes/modules/modFacture.class.php
@@ -56,11 +56,10 @@ class modFacture extends DolibarrModules
$this->name = "Factures";
$this->description = "Gestion des factures";
- $this->revision = explode(" ","$Revision$");
+ $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_FACTURE";
- $this->const_config = MAIN_MODULE_FACTURE;
+ $this->const_name = 'MAIN_MODULE_FACTURE';
$this->special = 0;
$this->picto='bill';
diff --git a/htdocs/includes/modules/modFicheinter.class.php b/htdocs/includes/modules/modFicheinter.class.php
index ee03446c728..ba7024eca03 100644
--- a/htdocs/includes/modules/modFicheinter.class.php
+++ b/htdocs/includes/modules/modFicheinter.class.php
@@ -60,8 +60,7 @@ class modFicheinter extends DolibarrModules
$this->revision = explode(" ","$Revision$");
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_FICHEINTER";
- $this->const_config = MAIN_MODULE_FICHEINTER;
+ $this->const_name = 'MAIN_MODULE_FICHEINTER';
$this->special = 0;
$this->picto = "intervention";
diff --git a/htdocs/includes/modules/modFournisseur.class.php b/htdocs/includes/modules/modFournisseur.class.php
index c201f798023..40f725e1590 100644
--- a/htdocs/includes/modules/modFournisseur.class.php
+++ b/htdocs/includes/modules/modFournisseur.class.php
@@ -57,8 +57,7 @@ class modFournisseur extends DolibarrModules
$this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_FOURNISSEUR";
- $this->const_config = MAIN_MODULE_FOURNISSEUR;
+ $this->const_name = 'MAIN_MODULE_FOURNISSEUR';
$this->special = 0;
$this->picto='company';
diff --git a/htdocs/includes/modules/modLdap.class.php b/htdocs/includes/modules/modLdap.class.php
index 406d493ca78..ae0dbc4d50a 100644
--- a/htdocs/includes/modules/modLdap.class.php
+++ b/htdocs/includes/modules/modLdap.class.php
@@ -53,8 +53,7 @@ class modLdap extends DolibarrModules
$this->family = "technic";
$this->description = "Synchronisation Ldap";
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_LDAP";
- $this->const_config = MAIN_MODULE_LDAP;
+ $this->const_name = 'MAIN_MODULE_LDAP';
$this->special = 1;
// Dir
diff --git a/htdocs/includes/modules/modMailing.class.php b/htdocs/includes/modules/modMailing.class.php
index 8c8089b2078..31435b130d4 100644
--- a/htdocs/includes/modules/modMailing.class.php
+++ b/htdocs/includes/modules/modMailing.class.php
@@ -55,8 +55,7 @@ class modMailing extends DolibarrModules
$this->name = "Mailings";
$this->description = "Gestion des Mailings";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_MAILING";
- $this->const_config = MAIN_MODULE_MAILING;
+ $this->const_name = 'MAIN_MODULE_MAILING';
$this->special = 1;
$this->picto='email';
diff --git a/htdocs/includes/modules/modPostnuke.class.php b/htdocs/includes/modules/modPostnuke.class.php
index 5f43d1a4d13..8632c79a304 100644
--- a/htdocs/includes/modules/modPostnuke.class.php
+++ b/htdocs/includes/modules/modPostnuke.class.php
@@ -53,8 +53,7 @@ class modPostnuke extends DolibarrModules
$this->name = "Postnuke";
$this->description = "Gestion de l'outil PostNuke";
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_POSTNUKE";
- $this->const_config = MAIN_MODULE_POSTNUKE;
+ $this->const_name = 'MAIN_MODULE_POSTNUKE';
$this->special = 1;
// Dir
diff --git a/htdocs/includes/modules/modPrelevement.class.php b/htdocs/includes/modules/modPrelevement.class.php
index 0ffa53862f5..bca13d12fa7 100644
--- a/htdocs/includes/modules/modPrelevement.class.php
+++ b/htdocs/includes/modules/modPrelevement.class.php
@@ -60,8 +60,7 @@ class modPrelevement extends DolibarrModules
$this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_PRELEVEMENT";
- $this->const_config = MAIN_MODULE_PRELEVEMENT;
+ $this->const_name = 'MAIN_MODULE_PRELEVEMENT';
$this->special = 0;
// Dir
diff --git a/htdocs/includes/modules/modProduit.class.php b/htdocs/includes/modules/modProduit.class.php
index 9aa6f3266bf..822e44f8bac 100644
--- a/htdocs/includes/modules/modProduit.class.php
+++ b/htdocs/includes/modules/modProduit.class.php
@@ -59,8 +59,7 @@ class modProduit extends DolibarrModules
$this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_PRODUIT";
- $this->const_config = MAIN_MODULE_PRODUIT;
+ $this->const_name = 'MAIN_MODULE_PRODUIT';
$this->special = 0;
$this->picto='product';
diff --git a/htdocs/includes/modules/modProjet.class.php b/htdocs/includes/modules/modProjet.class.php
index dfa284e839a..34e77e55ae3 100644
--- a/htdocs/includes/modules/modProjet.class.php
+++ b/htdocs/includes/modules/modProjet.class.php
@@ -57,8 +57,7 @@ class modProjet extends DolibarrModules
$this->revision = explode(" ","$Revision$");
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_PROJET";
- $this->const_config = MAIN_MODULE_PROJET;
+ $this->const_name = 'MAIN_MODULE_PROJET';
// Dépendances
$this->depends = array();
diff --git a/htdocs/includes/modules/modPropale.class.php b/htdocs/includes/modules/modPropale.class.php
index e39d6efd11e..7cbab8218a6 100644
--- a/htdocs/includes/modules/modPropale.class.php
+++ b/htdocs/includes/modules/modPropale.class.php
@@ -58,8 +58,7 @@ class modPropale extends DolibarrModules
$this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_PROPALE";
- $this->const_config = MAIN_MODULE_PROPALE;
+ $this->const_name = 'MAIN_MODULE_PROPALE';
$this->special = 0;
$this->picto='propal';
diff --git a/htdocs/includes/modules/modService.class.php b/htdocs/includes/modules/modService.class.php
index 63caacec7b2..f574ad2f396 100644
--- a/htdocs/includes/modules/modService.class.php
+++ b/htdocs/includes/modules/modService.class.php
@@ -59,8 +59,7 @@ class modService extends DolibarrModules
$this->revision = explode(" ","$Revision$");
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_SERVICE";
- $this->const_config = MAIN_MODULE_SERVICE;
+ $this->const_name = 'MAIN_MODULE_SERVICE';
$this->picto='service';
// Dépendances
diff --git a/htdocs/includes/modules/modSociete.class.php b/htdocs/includes/modules/modSociete.class.php
index 25cc59624e5..93571fcdaeb 100644
--- a/htdocs/includes/modules/modSociete.class.php
+++ b/htdocs/includes/modules/modSociete.class.php
@@ -57,11 +57,10 @@ class modSociete extends DolibarrModules
$this->name = "Module societe";
$this->description = "Gestion des sociétés et contacts";
- $this->revision = explode(" ","$Revision$");
+ $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_SOCIETE";
- $this->const_config = MAIN_MODULE_SOCIETE;
+ $this->const_name = 'MAIN_MODULE_SOCIETE';
$this->special = 0;
$this->config_page_url = "societe.php";
$this->picto='company';
diff --git a/htdocs/includes/modules/modStock.class.php b/htdocs/includes/modules/modStock.class.php
index b331263bcbc..6f66e2d032f 100644
--- a/htdocs/includes/modules/modStock.class.php
+++ b/htdocs/includes/modules/modStock.class.php
@@ -58,8 +58,7 @@ class modStock extends DolibarrModules
$this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_STOCK";
- $this->const_config = MAIN_MODULE_STOCK;
+ $this->const_name = 'MAIN_MODULE_STOCK';
$this->special = 0;
$this->picto='stock';
diff --git a/htdocs/includes/modules/modSyslog.class.php b/htdocs/includes/modules/modSyslog.class.php
index 8b4fac84166..5fccd135b37 100644
--- a/htdocs/includes/modules/modSyslog.class.php
+++ b/htdocs/includes/modules/modSyslog.class.php
@@ -54,9 +54,8 @@ class modSyslog extends DolibarrModules
$this->family = "technic";
$this->name = "Syslog";
$this->description = "Activation des traces debug (syslog)";
- $this->version = '2.0.0'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_SYSLOG";
- $this->const_config = MAIN_MODULE_SYSLOG;
+ $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
+ $this->const_name = 'MAIN_MODULE_SYSLOG';
$this->special = 0;
//$this->picto='phoning';
diff --git a/htdocs/includes/modules/modUser.class.php b/htdocs/includes/modules/modUser.class.php
index 71263c60aac..1ff87998a5c 100644
--- a/htdocs/includes/modules/modUser.class.php
+++ b/htdocs/includes/modules/modUser.class.php
@@ -54,16 +54,18 @@ class modUser extends DolibarrModules
$this->name = "User";
$this->description = "Gestion des utilisateurs (requis)";
- $this->revision = explode(" ","$Revision$");
+ $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1];
- $this->const_name = "MAIN_MODULE_USER";
- $this->const_config = MAIN_MODULE_USER;
+ $this->const_name = 'MAIN_MODULE_USER';
$this->picto='group';
// Dir
$this->dirs = array();
+ // Config pages
+ $this->config_page_url = "/user/admin/index.php";
+
// Dépendances
$this->depends = array();
$this->requiredby = array();
@@ -75,32 +77,75 @@ class modUser extends DolibarrModules
$this->boxes = array();
// Permissions
- $this->rights = array();
+ $this->rights = array(); // L'admin bénéficie toujours des droits de ce module, actif ou non
$this->rights_class = 'user';
+ $r=0;
+
+ $r++;
+ $this->rights[$r][0] = 251;
+ $this->rights[$r][1] = 'Consulter les autres utilisateurs, leurs groupes et permissions';
+ $this->rights[$r][2] = 'r';
+ $this->rights[$r][3] = 1;
+ $this->rights[$r][4] = 'user';
+ $this->rights[$r][5] = 'lire';
+
+ $r++;
+ $this->rights[$r][0] = 252;
+ $this->rights[$r][1] = 'Créer/modifier les autres utilisateurs, leurs groupes et permissions';
+ $this->rights[$r][2] = 'w';
+ $this->rights[$r][3] = 0;
+ $this->rights[$r][4] = 'user';
+ $this->rights[$r][5] = 'creer';
+
+ $r++;
+ $this->rights[$r][0] = 253;
+ $this->rights[$r][1] = 'Modifier mot de passe des autres utilisateurs';
+ $this->rights[$r][2] = 'w';
+ $this->rights[$r][3] = 0;
+ $this->rights[$r][4] = 'user';
+ $this->rights[$r][5] = 'password';
+
+ $r++;
+ $this->rights[$r][0] = 254;
+ $this->rights[$r][1] = 'Supprimer ou désactiver les autres utilisateurs';
+ $this->rights[$r][2] = 'd';
+ $this->rights[$r][3] = 0;
+ $this->rights[$r][4] = 'user';
+ $this->rights[$r][5] = 'supprimer';
+
+ $r++;
+ $this->rights[$r][0] = 255;
+ $this->rights[$r][1] = 'Créer/modifier ses propres infos utilisateur';
+ $this->rights[$r][2] = 'w';
+ $this->rights[$r][3] = 1;
+ $this->rights[$r][4] = 'self';
+ $this->rights[$r][5] = 'supprimer';
+
+ $r++;
+ $this->rights[$r][0] = 256;
+ $this->rights[$r][1] = 'Modifier son propre mot de passe';
+ $this->rights[$r][2] = 'w';
+ $this->rights[$r][3] = 1;
+ $this->rights[$r][4] = 'self';
+ $this->rights[$r][5] = 'password';
}
+
/**
* \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()
- {
- global $conf;
+ function init()
+ {
+ global $conf;
- // Permissions
- $this->remove();
- $r = 1;
+ // Permissions
+ $this->remove();
- $this->rights[$r][0] = 251;
- $this->rights[$r][1] = 'Consulter les utilisateurs';
- $this->rights[$r][2] = 'w';
- $this->rights[$r][3] = 1;
- $this->rights[$r][4] = 'user';
- $this->rights[$r][5] = 'lire';
- $r++;
-
- return $this->_init($sql);
- }
+ $sql = array();
+
+ return $this->_init($sql);
+ }
/**
\brief Fonction appelée lors de la désactivation d'un module.
diff --git a/htdocs/includes/modules/modWebcalendar.class.php b/htdocs/includes/modules/modWebcalendar.class.php
index 60d55b6c288..1b7bdc95603 100644
--- a/htdocs/includes/modules/modWebcalendar.class.php
+++ b/htdocs/includes/modules/modWebcalendar.class.php
@@ -54,8 +54,7 @@ class modWebcalendar extends DolibarrModules
$this->name = "Webcalendar";
$this->description = "Interfaçage avec le calendrier Webcalendar";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
- $this->const_name = "MAIN_MODULE_WEBCALENDAR";
- $this->const_config = MAIN_MODULE_WEBCALENDAR;
+ $this->const_name = 'MAIN_MODULE_WEBCALENDAR';
$this->special = 0;
$this->picto='calendar';