Le test sur l'activation du module socit a t mis "if ($conf->societe->enabled)" partout plutot que "if ($conf->societe == 1)" afin d'etre conforme avec les autres modules.

This commit is contained in:
Laurent Destailleur 2004-02-21 14:01:01 +00:00
parent 31207f3e8a
commit 2ed8a08607
4 changed files with 19 additions and 14 deletions

View File

@ -198,10 +198,9 @@ if (defined("MAIN_MODULE_EXPEDITION"))
{
$conf->expedition->enabled=MAIN_MODULE_EXPEDITION;
}
if (defined("MAIN_MODULE_SOCIETE") && MAIN_MODULE_SOCIETE)
if (defined("MAIN_MODULE_SOCIETE"))
{
$conf->societe->enabled=MAIN_MODULE_SOCIETE;
$conf->societe = 1 ; // TODO A remplacer par $conf->societe->enabled
}
if (defined("MAIN_MODULE_COMMERCIAL"))
{
@ -211,7 +210,7 @@ if (defined("MAIN_MODULE_COMPTABILITE"))
{
$conf->compta->enabled=MAIN_MODULE_COMPTABILITE;
}
if (defined("MAIN_MODULE_DON") && MAIN_MODULE_DON)
if (defined("MAIN_MODULE_DON"))
{
$conf->don->enabled=MAIN_MODULE_DON;
}
@ -219,15 +218,11 @@ if (defined("MAIN_MODULE_FOURNISSEUR"))
{
$conf->fournisseur->enabled=MAIN_MODULE_FOURNISSEUR;
}
if (defined("MAIN_MODULE_FICHEINTER") && MAIN_MODULE_FICHEINTER)
if (defined("MAIN_MODULE_FICHEINTER"))
{
require (DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/modules_fichinter.php");
$conf->fichinter->enabled=MAIN_MODULE_FICHEINTER;
}
if (defined("MAIN_MODULE_COMMANDE") && MAIN_MODULE_COMMANDE)
{
$conf->commande->enabled=MAIN_MODULE_COMMANDE;
}
if (defined("MAIN_MODULE_ADHERENT"))
{
$conf->adherent->enabled=MAIN_MODULE_ADHERENT;
@ -240,6 +235,10 @@ if (defined("MAIN_MODULE_SERVICE"))
{
$conf->service->enabled=MAIN_MODULE_SERVICE;
}
if (defined("MAIN_MODULE_STOCK"))
{
$conf->stock->enabled=MAIN_MODULE_STOCK;
}
if (defined("MAIN_MODULE_BOUTIQUE"))
{
$conf->boutique->enabled=MAIN_MODULE_BOUTIQUE;
@ -256,7 +255,11 @@ if (defined("BOUTIQUE_ALBUM"))
{
$conf->boutique->album->enabled=BOUTIQUE_ALBUM;
}
if (defined("MAIN_MODULE_FACTURE") && MAIN_MODULE_FACTURE)
if (defined("MAIN_MODULE_POSTNUKE"))
{
$conf->postnuke->enabled=MAIN_MODULE_POSTNUKE;
}
if (defined("MAIN_MODULE_FACTURE"))
{
require (DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
@ -267,7 +270,7 @@ if (defined("MAIN_MODULE_FACTURE") && MAIN_MODULE_FACTURE)
if (defined("FACTURE_ADDON_PDF"))
require(DOL_DOCUMENT_ROOT ."/includes/modules/facture/pdf_".FACTURE_ADDON_PDF.".modules.php");
}
if (defined("MAIN_MODULE_PROPALE") && MAIN_MODULE_PROPALE)
if (defined("MAIN_MODULE_PROPALE"))
{
$conf->propal->enabled=MAIN_MODULE_PROPALE;

View File

@ -35,7 +35,7 @@ function llxHeader($head = "") {
$menu = new Menu();
if ($conf->societe)
if ($conf->societe->enabled)
{
$menu->add(DOL_URL_ROOT."/societe.php", "Sociétés","company");
@ -124,7 +124,7 @@ function llxHeader($head = "") {
$menu->add(DOL_URL_ROOT."/domain/index.php", "Domaines");
}
if (defined("MAIN_MODULE_POSTNUKE") && MAIN_MODULE_POSTNUKE)
if ($conf->postnuke->enabled)
{
$menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial");
}

View File

@ -1,5 +1,6 @@
<?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -34,7 +35,7 @@ function llxHeader($head = "")
$menu = new Menu();
if ($conf->societe && $conf->commercial->enabled)
if ($conf->societe->enabled && $conf->commercial->enabled)
{
$menu->add(DOL_URL_ROOT."/societe.php", "Sociétés","company");

View File

@ -1,5 +1,6 @@
<?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -34,7 +35,7 @@ function llxHeader($head = "")
$menu = new Menu();
if ($conf->societe && $conf->commercial->enabled)
if ($conf->societe->enabled && $conf->commercial->enabled)
{
$menu->add(DOL_URL_ROOT."/societe.php", "Sociétés","company");