mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Tracking conf->module->enabled 3 (#31905)
* Tracking $conf->module->enabled part 2 * Tracking $conf->module->enabled part 3 * Tracking $conf->module->enabled part 3 --------- Co-authored-by: Theobald <f.moreau@theobald-groupe.com>
This commit is contained in:
parent
ee65f40512
commit
9dee6b56af
|
|
@ -43,7 +43,7 @@ function propal_prepare_head($object)
|
|||
$head[$h][2] = 'comm';
|
||||
$h++;
|
||||
|
||||
if ((empty($conf->commande->enabled) && ((isModEnabled("shipping") && getDolGlobalInt('MAIN_SUBMODULE_EXPEDITION') && $user->hasRight('expedition', 'lire'))
|
||||
if ((!isModEnabled('order') && ((isModEnabled("shipping") && getDolGlobalInt('MAIN_SUBMODULE_EXPEDITION') && $user->hasRight('expedition', 'lire'))
|
||||
|| (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && $user->hasRight('expedition', 'delivery', 'lire'))))) {
|
||||
$langs->load("sendings");
|
||||
$text = '';
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class modAsset extends DolibarrModules
|
|||
);
|
||||
|
||||
|
||||
if (!isset($conf->asset) || !isset($conf->asset->enabled)) {
|
||||
if (!isModEnabled('asset')) {
|
||||
$conf->asset = new stdClass();
|
||||
$conf->asset->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class modCollab extends DolibarrModules
|
|||
'url' => '/collab/index.php',
|
||||
'langs' => 'collab', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position' => 100,
|
||||
'enabled' => '$conf->collab->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'enabled' => 'isModEnabled("collab")', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms' => '1', // Use 'perms'=>'$user->hasRight("mymodule","level1","level2")' if you want your menu with a permission rules
|
||||
'target' => '',
|
||||
'user' => 2 // 0=Menu for internal users, 1=external users, 2=both
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class modDataPolicy extends DolibarrModules
|
|||
'fr_FR:ParentCompany'=>'Maison mère ou revendeur'
|
||||
) */
|
||||
|
||||
if (!isset($conf->datapolicy) || !isset($conf->datapolicy->enabled)) {
|
||||
if (!isModEnabled('datapolicy')) {
|
||||
$conf->datapolicy = new stdClass();
|
||||
$conf->datapolicy->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user