From 2ed8a08607c142438ff1c837b73fef765067fd66 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 21 Feb 2004 14:01:01 +0000 Subject: [PATCH] =?UTF-8?q?Le=20test=20sur=20l'activation=20du=20module=20?= =?UTF-8?q?soci=E9t=E9=20a=20=E9t=E9=20mis=20=E0=20"if=20($conf->societe->?= =?UTF-8?q?enabled)"=20partout=20plutot=20que=20"if=20($conf->societe=20?= =?UTF-8?q?=3D=3D=201)"=20afin=20d'etre=20conforme=20avec=20les=20autres?= =?UTF-8?q?=20modules.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/main.inc.php | 23 +++++++++++++---------- htdocs/pre.inc.php | 4 ++-- htdocs/societe/notify/pre.inc.php | 3 ++- htdocs/societe/pre.inc.php | 3 ++- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 76947551ed2..bc3fa94a17b 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -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; diff --git a/htdocs/pre.inc.php b/htdocs/pre.inc.php index a97d24a3c01..6c0ad924ac9 100644 --- a/htdocs/pre.inc.php +++ b/htdocs/pre.inc.php @@ -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"); } diff --git a/htdocs/societe/notify/pre.inc.php b/htdocs/societe/notify/pre.inc.php index 633d3f5e5d5..788e2939402 100644 --- a/htdocs/societe/notify/pre.inc.php +++ b/htdocs/societe/notify/pre.inc.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * 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"); diff --git a/htdocs/societe/pre.inc.php b/htdocs/societe/pre.inc.php index 0054a065e3b..ea7cf78f814 100644 --- a/htdocs/societe/pre.inc.php +++ b/htdocs/societe/pre.inc.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * 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");