From 01dfca7bfba5d429a1c68393d8d96f374ac36e9e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Jan 2005 21:24:23 +0000 Subject: [PATCH] New: Ajoute la notion de version aux modules. --- htdocs/admin/modules.php | 5 ++++- .../includes/modules/DolibarrModules.class.php | 16 ++++++++++++++++ htdocs/includes/modules/modAdherent.class.php | 1 + htdocs/includes/modules/modBanque.class.php | 7 ++++--- htdocs/includes/modules/modBoutique.class.php | 1 + htdocs/includes/modules/modClickToDial.class.php | 3 ++- htdocs/includes/modules/modCommande.class.php | 1 + htdocs/includes/modules/modCommercial.class.php | 1 + .../includes/modules/modComptabilite.class.php | 1 + htdocs/includes/modules/modContrat.class.php | 1 + htdocs/includes/modules/modDeplacement.class.php | 5 +++-- htdocs/includes/modules/modDon.class.php | 3 ++- htdocs/includes/modules/modExpedition.class.php | 1 + htdocs/includes/modules/modExternalRss.class.php | 1 + htdocs/includes/modules/modFacture.class.php | 1 + htdocs/includes/modules/modFicheinter.class.php | 1 + htdocs/includes/modules/modFournisseur.class.php | 1 + htdocs/includes/modules/modLdap.class.php | 1 + htdocs/includes/modules/modPostnuke.class.php | 3 ++- htdocs/includes/modules/modPrelevement.class.php | 3 ++- htdocs/includes/modules/modProduit.class.php | 1 + htdocs/includes/modules/modProjet.class.php | 1 + htdocs/includes/modules/modPropale.class.php | 1 + htdocs/includes/modules/modService.class.php | 1 + htdocs/includes/modules/modSociete.class.php | 1 + htdocs/includes/modules/modStock.class.php | 1 + htdocs/includes/modules/modTelephonie.class.php | 3 ++- htdocs/includes/modules/modWebcalendar.class.php | 1 + 28 files changed, 56 insertions(+), 11 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 8e9cea92a35..fa6b4c7c841 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -146,6 +146,7 @@ print "\n"; print " ".$langs->trans("Family")."\n"; print " ".$langs->trans("Module")."\n"; print " ".$langs->trans("Description")."\n"; +print " ".$langs->trans("Version")."\n"; print " ".$langs->trans("Activated")."\n"; print " ".$langs->trans("Action")."\n"; print "  \n"; @@ -214,7 +215,7 @@ foreach ($orders as $key => $value) $const_value = $objMod->const_config; if ($oldfamily && $family!=$oldfamily && $atleastoneforfamily) { - print "\n \n\n"; + print "\n \n\n"; $atleastoneforfamily=0; } @@ -241,6 +242,8 @@ foreach ($orders as $key => $value) print "\n "; print $objMod->getDesc(); print "\n "; + print $objMod->getVersion(); + print "\n "; if ($const_value == 1) { diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php index 13704af544e..299856789cd 100644 --- a/htdocs/includes/modules/DolibarrModules.class.php +++ b/htdocs/includes/modules/DolibarrModules.class.php @@ -314,5 +314,21 @@ class DolibarrModules } } + /** \brief Retourne la version du module. + * Pour les modules à l'état 'experimental', retourne la traduction de 'experimental' + * Pour les modules 'dolibarr', retourne la version de Dolibarr + * Pour les autres modules, retourne la version du module + * \return string Nom du module traduit + */ + function getVersion() + { + global $langs; + $langs->load("admin"); + + if ($this->version == 'experimental') return $langs->trans("Experimental"); + elseif ($this->version == 'dolibarr') return DOL_VERSION; + elseif ($this->version) return $this->version; + else return $langs->trans("Unknown"); + } } ?> diff --git a/htdocs/includes/modules/modAdherent.class.php b/htdocs/includes/modules/modAdherent.class.php index b223472e09e..7fdf9b71427 100644 --- a/htdocs/includes/modules/modAdherent.class.php +++ b/htdocs/includes/modules/modAdherent.class.php @@ -55,6 +55,7 @@ class modAdherent extends DolibarrModules $this->family = "hr"; $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->special = 0; diff --git a/htdocs/includes/modules/modBanque.class.php b/htdocs/includes/modules/modBanque.class.php index 356e2d48fab..d9300e2a0fb 100644 --- a/htdocs/includes/modules/modBanque.class.php +++ b/htdocs/includes/modules/modBanque.class.php @@ -23,11 +23,11 @@ * */ -/*! \defgroup banque Module banque +/** \defgroup banque Module banque \brief Module pour gérer la tenue d'un compte bancaire et rapprochements */ -/*! +/** \file htdocs/includes/modules/modBanque.class.php \ingroup banque \brief Fichier de description et activation du module Banque @@ -35,7 +35,7 @@ include_once "DolibarrModules.class.php"; -/*! \class modBanque +/** \class modBanque \brief Classe de description et activation du module Banque */ @@ -54,6 +54,7 @@ class modBanque extends DolibarrModules $this->family = "financial"; $this->name = "Banque"; $this->description = "Gestion des comptes financiers de type Comptes bancaires ou postaux"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_BANQUE"; $this->const_config = MAIN_MODULE_BANQUE; diff --git a/htdocs/includes/modules/modBoutique.class.php b/htdocs/includes/modules/modBoutique.class.php index 3254baf7195..67da1ec74c0 100644 --- a/htdocs/includes/modules/modBoutique.class.php +++ b/htdocs/includes/modules/modBoutique.class.php @@ -54,6 +54,7 @@ class modBoutique extends DolibarrModules $this->family = "products"; $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->special = 0; diff --git a/htdocs/includes/modules/modClickToDial.class.php b/htdocs/includes/modules/modClickToDial.class.php index 6345acb2daa..6ab4d6f801c 100644 --- a/htdocs/includes/modules/modClickToDial.class.php +++ b/htdocs/includes/modules/modClickToDial.class.php @@ -51,7 +51,8 @@ class modClickToDial extends DolibarrModules $this->family = "technic"; $this->name = "ClickToDial"; - $this->description = "Gestion du click to dial (experimental)"; + $this->description = "Gestion du Click To Dial"; + $this->version = 'experimental'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_CLICKTODIAL"; $this->const_config = MAIN_MODULE_CLICKTODIAL; $this->special = 1; diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php index c6a0f71fc88..5d3c10540da 100644 --- a/htdocs/includes/modules/modCommande.class.php +++ b/htdocs/includes/modules/modCommande.class.php @@ -55,6 +55,7 @@ class modCommande extends DolibarrModules $this->family = "crm"; $this->name = "Commande"; $this->description = "Gestion des commandes"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_COMMANDE"; $this->const_config = MAIN_MODULE_COMMANDE; $this->special = 0; diff --git a/htdocs/includes/modules/modCommercial.class.php b/htdocs/includes/modules/modCommercial.class.php index 2bd325757a6..02d40015e2c 100644 --- a/htdocs/includes/modules/modCommercial.class.php +++ b/htdocs/includes/modules/modCommercial.class.php @@ -54,6 +54,7 @@ class modCommercial extends DolibarrModules $this->family = "crm"; $this->name = "Commercial"; $this->description = "Gestion commercial"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_COMMERCIAL"; $this->const_config = MAIN_MODULE_COMMERCIAL; $this->special = 0; diff --git a/htdocs/includes/modules/modComptabilite.class.php b/htdocs/includes/modules/modComptabilite.class.php index 6ca337fc146..ba90ced6043 100644 --- a/htdocs/includes/modules/modComptabilite.class.php +++ b/htdocs/includes/modules/modComptabilite.class.php @@ -54,6 +54,7 @@ class modComptabilite extends DolibarrModules $this->family = "financial"; $this->name = "Comptabilite"; $this->description = "Gestion sommaire de comptabilité"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_COMPTABILITE"; $this->const_config = MAIN_MODULE_COMPTABILITE; diff --git a/htdocs/includes/modules/modContrat.class.php b/htdocs/includes/modules/modContrat.class.php index 785e7e05ae8..52fd5cacf2c 100644 --- a/htdocs/includes/modules/modContrat.class.php +++ b/htdocs/includes/modules/modContrat.class.php @@ -51,6 +51,7 @@ class modContrat extends DolibarrModules $this->family = "crm"; $this->name = "Contrats"; $this->description = "Gestion des contrats de services"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_CONTRAT"; $this->const_config = MAIN_MODULE_CONTRAT; $this->special = 0; diff --git a/htdocs/includes/modules/modDeplacement.class.php b/htdocs/includes/modules/modDeplacement.class.php index 746fed8fa7a..17041390965 100644 --- a/htdocs/includes/modules/modDeplacement.class.php +++ b/htdocs/includes/modules/modDeplacement.class.php @@ -48,8 +48,9 @@ class modDeplacement extends DolibarrModules $this->numero = 75 ; $this->family = "crm"; - $this->name = "Déplacement"; // Si traduction Module80Name non trouvée - $this->description = "Gestion des déplacements"; // Si traduction Module80Desc non trouvée + $this->name = "Déplacement"; // Si traduction Module75Name non trouvée + $this->description = "Gestion des déplacements"; // Si traduction Module75Desc non trouvée + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_DEPLACEMENT"; $this->const_config = MAIN_MODULE_DEPLACEMENT; $this->special = 0; diff --git a/htdocs/includes/modules/modDon.class.php b/htdocs/includes/modules/modDon.class.php index 013667efb90..00dd28f1358 100644 --- a/htdocs/includes/modules/modDon.class.php +++ b/htdocs/includes/modules/modDon.class.php @@ -51,7 +51,8 @@ class modDon extends DolibarrModules $this->family = "financial"; $this->name = "Don"; - $this->description = "Gestion des dons (expérimental)"; + $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->special = 0; diff --git a/htdocs/includes/modules/modExpedition.class.php b/htdocs/includes/modules/modExpedition.class.php index 96a11ab0ec4..5877f6e7666 100644 --- a/htdocs/includes/modules/modExpedition.class.php +++ b/htdocs/includes/modules/modExpedition.class.php @@ -52,6 +52,7 @@ class modExpedition extends DolibarrModules $this->family = "crm"; $this->name = "Expedition"; $this->description = "Gestion des expéditions"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_EXPEDITION"; $this->const_config = MAIN_MODULE_EXPEDITION; $this->special = 0; diff --git a/htdocs/includes/modules/modExternalRss.class.php b/htdocs/includes/modules/modExternalRss.class.php index 88a8254db82..80315a83c98 100644 --- a/htdocs/includes/modules/modExternalRss.class.php +++ b/htdocs/includes/modules/modExternalRss.class.php @@ -52,6 +52,7 @@ class modExternalRss extends DolibarrModules $this->family = "technic"; $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->special = 0; diff --git a/htdocs/includes/modules/modFacture.class.php b/htdocs/includes/modules/modFacture.class.php index efef8d0cd41..7e5195edb6a 100644 --- a/htdocs/includes/modules/modFacture.class.php +++ b/htdocs/includes/modules/modFacture.class.php @@ -55,6 +55,7 @@ class modFacture extends DolibarrModules $this->family = "financial"; $this->name = "Factures"; $this->description = "Gestion des factures"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_FACTURE"; $this->const_config = MAIN_MODULE_FACTURE; $this->special = 0; diff --git a/htdocs/includes/modules/modFicheinter.class.php b/htdocs/includes/modules/modFicheinter.class.php index 86a89050dc6..ddb4722f15d 100644 --- a/htdocs/includes/modules/modFicheinter.class.php +++ b/htdocs/includes/modules/modFicheinter.class.php @@ -54,6 +54,7 @@ class modFicheinter extends DolibarrModules $this->family = "crm"; $this->name = "Fiche d'intervention"; $this->description = "Gestion des fiches d'intervention"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_FICHEINTER"; $this->const_config = MAIN_MODULE_FICHEINTER; $this->special = 0; diff --git a/htdocs/includes/modules/modFournisseur.class.php b/htdocs/includes/modules/modFournisseur.class.php index 8d4b6391b01..e0815aa7816 100644 --- a/htdocs/includes/modules/modFournisseur.class.php +++ b/htdocs/includes/modules/modFournisseur.class.php @@ -53,6 +53,7 @@ class modFournisseur extends DolibarrModules $this->family = "products"; $this->name = "Fournisseur"; $this->description = "Gestion des fournisseurs"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_FOURNISSEUR"; $this->const_config = MAIN_MODULE_FOURNISSEUR; $this->special = 0; diff --git a/htdocs/includes/modules/modLdap.class.php b/htdocs/includes/modules/modLdap.class.php index ad87bf9695c..c2d70a5f458 100644 --- a/htdocs/includes/modules/modLdap.class.php +++ b/htdocs/includes/modules/modLdap.class.php @@ -51,6 +51,7 @@ class modLdap extends DolibarrModules $this->name = "Ldap"; $this->family = "technic"; $this->description = "Synchronisation Ldap"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_LDAP"; $this->const_config = MAIN_MODULE_LDAP; $this->special = 1; diff --git a/htdocs/includes/modules/modPostnuke.class.php b/htdocs/includes/modules/modPostnuke.class.php index f2df12db870..5f43d1a4d13 100644 --- a/htdocs/includes/modules/modPostnuke.class.php +++ b/htdocs/includes/modules/modPostnuke.class.php @@ -51,7 +51,8 @@ class modPostnuke extends DolibarrModules $this->family = "technic"; $this->name = "Postnuke"; - $this->description = "Gestion de l'outil 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->special = 1; diff --git a/htdocs/includes/modules/modPrelevement.class.php b/htdocs/includes/modules/modPrelevement.class.php index c4b2cdbf87e..af87fe25b32 100644 --- a/htdocs/includes/modules/modPrelevement.class.php +++ b/htdocs/includes/modules/modPrelevement.class.php @@ -52,7 +52,8 @@ class modPrelevement extends DolibarrModules $this->family = "technic"; $this->name = "Prelevement"; - $this->description = "Gestion des Prélèvements (experimental)"; + $this->description = "Gestion des Prélèvements"; + $this->version = 'experimental'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_PRELEVEMENT"; $this->const_config = MAIN_MODULE_PRELEVEMENT; $this->special = 0; diff --git a/htdocs/includes/modules/modProduit.class.php b/htdocs/includes/modules/modProduit.class.php index ecb9572945b..2d69b206b5c 100644 --- a/htdocs/includes/modules/modProduit.class.php +++ b/htdocs/includes/modules/modProduit.class.php @@ -54,6 +54,7 @@ class modProduit extends DolibarrModules $this->family = "products"; $this->name = "Produit"; $this->description = "Gestion des produits"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_PRODUIT"; $this->const_config = MAIN_MODULE_PRODUIT; $this->special = 0; diff --git a/htdocs/includes/modules/modProjet.class.php b/htdocs/includes/modules/modProjet.class.php index 1ef9636f1ff..974ac615a83 100644 --- a/htdocs/includes/modules/modProjet.class.php +++ b/htdocs/includes/modules/modProjet.class.php @@ -54,6 +54,7 @@ class modProjet extends DolibarrModules $this->family = "projects"; $this->name = "Projets"; $this->description = "Gestion des projets"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_PROJET"; $this->const_config = MAIN_MODULE_PROJET; diff --git a/htdocs/includes/modules/modPropale.class.php b/htdocs/includes/modules/modPropale.class.php index 282886f0e0c..e663e37ab0e 100644 --- a/htdocs/includes/modules/modPropale.class.php +++ b/htdocs/includes/modules/modPropale.class.php @@ -54,6 +54,7 @@ class modPropale extends DolibarrModules $this->family = "crm"; $this->name = "Propositions commerciales"; $this->description = "Gestion des propositions commerciales"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_PROPALE"; $this->const_config = MAIN_MODULE_PROPALE; $this->special = 0; diff --git a/htdocs/includes/modules/modService.class.php b/htdocs/includes/modules/modService.class.php index d77ac400fec..ee170bd8a19 100644 --- a/htdocs/includes/modules/modService.class.php +++ b/htdocs/includes/modules/modService.class.php @@ -54,6 +54,7 @@ class modService extends DolibarrModules $this->family = "products"; $this->name = "Service"; $this->description = "Gestion des services"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_SERVICE"; $this->const_config = MAIN_MODULE_SERVICE; diff --git a/htdocs/includes/modules/modSociete.class.php b/htdocs/includes/modules/modSociete.class.php index dafd7398879..29a56c39f7f 100644 --- a/htdocs/includes/modules/modSociete.class.php +++ b/htdocs/includes/modules/modSociete.class.php @@ -54,6 +54,7 @@ class modSociete extends DolibarrModules $this->family = "crm"; $this->name = "Module societe"; $this->description = "Gestion des sociétés et contacts"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_SOCIETE"; $this->const_config = MAIN_MODULE_SOCIETE; $this->special = 0; diff --git a/htdocs/includes/modules/modStock.class.php b/htdocs/includes/modules/modStock.class.php index b4800b7c0c4..33a5081d835 100644 --- a/htdocs/includes/modules/modStock.class.php +++ b/htdocs/includes/modules/modStock.class.php @@ -52,6 +52,7 @@ class modStock extends DolibarrModules $this->family = "products"; $this->name = "Stock produits"; $this->description = "Gestion des stocks"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_STOCK"; $this->const_config = MAIN_MODULE_STOCK; $this->special = 0; diff --git a/htdocs/includes/modules/modTelephonie.class.php b/htdocs/includes/modules/modTelephonie.class.php index 447bd0bff1b..1cf8cebcfea 100644 --- a/htdocs/includes/modules/modTelephonie.class.php +++ b/htdocs/includes/modules/modTelephonie.class.php @@ -50,7 +50,8 @@ class modTelephonie extends DolibarrModules $this->family = "technic"; $this->name = "Telephonie"; - $this->description = "Gestion de la Telephonie (experimental)"; + $this->description = "Gestion de la Telephonie"; + $this->version = 'experimental'; // 'experimental' or 'dolibarr' or version $this->const_name = "MAIN_MODULE_TELEPHONIE"; $this->const_config = MAIN_MODULE_TELEPHONIE; $this->special = 1; diff --git a/htdocs/includes/modules/modWebcalendar.class.php b/htdocs/includes/modules/modWebcalendar.class.php index 2d654c47fea..48ed1a2a372 100644 --- a/htdocs/includes/modules/modWebcalendar.class.php +++ b/htdocs/includes/modules/modWebcalendar.class.php @@ -53,6 +53,7 @@ class modWebcalendar extends DolibarrModules $this->family = "projects"; $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->special = 0;