Backport or better module compatibility

This commit is contained in:
Laurent Destailleur
2023-11-05 19:35:34 +01:00
parent 35a25599e5
commit 9c7381601f

View File

@@ -64,6 +64,17 @@ function getDolGlobalInt($key)
return (int) (empty($conf->global->$key) ? 0 : $conf->global->$key);
}
/**
* Is Dolibarr module enabled
* @param string $module module name to check
* @return int
*/
function isModEnabled($module)
{
global $conf;
return !empty($conf->$module->enabled);
}
/**
* Return a DoliDB instance (database handler).
*