mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
use isModEnabled function
This commit is contained in:
@@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
|||||||
global $conf, $langs, $user, $db;
|
global $conf, $langs, $user, $db;
|
||||||
$langs->loadLangs(array("admin", "other", "modulebuilder"));
|
$langs->loadLangs(array("admin", "other", "modulebuilder"));
|
||||||
|
|
||||||
if (!$user->admin || empty($conf->modulebuilder->enabled)) {
|
if (!$user->admin || !isModEnabled('modulebuilder')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ $objectname = dol_sanitizeFileName(GETPOST('objectname', 'alpha'));
|
|||||||
$dicname = dol_sanitizeFileName(GETPOST('dicname', 'alpha'));
|
$dicname = dol_sanitizeFileName(GETPOST('dicname', 'alpha'));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->modulebuilder->enabled)) {
|
if (!isModEnabled('modulebuilder')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) {
|
if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user