From 8f383e3fa1011d42df7ff1621a647ae49e043e53 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Jun 2017 14:12:40 +0200 Subject: [PATCH] Fix template --- htdocs/modulebuilder/template/core/boxes/mybox.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/core/boxes/mybox.php b/htdocs/modulebuilder/template/core/boxes/mybox.php index 4fcdd69ae26..7200d07559a 100644 --- a/htdocs/modulebuilder/template/core/boxes/mybox.php +++ b/htdocs/modulebuilder/template/core/boxes/mybox.php @@ -84,7 +84,7 @@ class MyBox extends ModeleBoxes */ public function __construct(DoliDB $db, $param = '') { - global $langs; + global $user, $conf, $langs; $langs->load("boxes"); $langs->load('mymodule@mymodule'); @@ -93,6 +93,9 @@ class MyBox extends ModeleBoxes $this->boxlabel = $langs->transnoentitiesnoconv("MyBox"); $this->param = $param; + + //$this->enabled = $conf->global->FEATURES_LEVEL > 0; // Condition when module is enabled or not + //$this->hidden = ! ($user->rights->mymodule->myobject->read); // Condition when module is visible by user (test on permission) } /**