Work on modulebuilder

This commit is contained in:
Laurent Destailleur
2017-07-16 14:57:30 +02:00
parent 816db0e856
commit 4d9ae5bb44
5 changed files with 369 additions and 52 deletions

View File

@@ -931,7 +931,8 @@ function unActivateModule($value, $requiredby=1)
{
//print $dir.$modFile;
// TODO Replace this after DolibarrModules is moved as abstract class with a try catch to show module we try to disable has not been found or could not be loaded
$genericMod = new DolibarrModules($db);
include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
$genericMod = new DolibarrModules($db);
$genericMod->name=preg_replace('/^mod/i','',$modName);
$genericMod->rights_class=strtolower(preg_replace('/^mod/i','',$modName));
$genericMod->const_name='MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',$modName));