mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
New : Add reload of modules in configuration
This commit is contained in:
@@ -1084,11 +1084,12 @@ function purgeSessions($mysessionid)
|
||||
/**
|
||||
* Enable a module
|
||||
*
|
||||
* @param string $value Name of module to activate
|
||||
* @param int $withdeps Activate/Disable also all dependencies
|
||||
* @return array array('nbmodules'=>nb modules activated with success, 'errors=>array of error messages, 'nbperms'=>Nb permission added);
|
||||
* @param string $value Name of module to activate
|
||||
* @param int $withdeps Activate/Disable also all dependencies
|
||||
* @param int $noconfverification Remove verification of $conf variable for module
|
||||
* @return array array('nbmodules'=>nb modules activated with success, 'errors=>array of error messages, 'nbperms'=>Nb permission added);
|
||||
*/
|
||||
function activateModule($value, $withdeps = 1)
|
||||
function activateModule($value, $withdeps = 1, $noconfverification = 0)
|
||||
{
|
||||
global $db, $langs, $conf, $mysoc;
|
||||
|
||||
@@ -1144,8 +1145,10 @@ function activateModule($value, $withdeps = 1)
|
||||
}
|
||||
|
||||
$const_name = $objMod->const_name;
|
||||
if (!empty($conf->global->$const_name)) {
|
||||
return $ret;
|
||||
if ($noconfverification == 0) {
|
||||
if (!empty($conf->global->$const_name)) {
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
||||
$result = $objMod->init(); // Enable module
|
||||
|
||||
Reference in New Issue
Block a user