mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 11:31:26 +01:00
New isModEnabled function
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2019 Thibault Foucart <support@ptibogxiv.net>
|
* Copyright (C) 2019 Thibault Foucart <support@ptibogxiv.net>
|
||||||
* Copyright (C) 2020 Open-Dsi <support@open-dsi.fr>
|
* Copyright (C) 2020 Open-Dsi <support@open-dsi.fr>
|
||||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||||
@@ -68,6 +68,17 @@ function getDolGlobalInt($key, $default = 0)
|
|||||||
return (int) (empty($conf->global->$key) ? $default : $conf->global->$key);
|
return (int) (empty($conf->global->$key) ? $default : $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).
|
* Return a DoliDB instance (database handler).
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user