From e060e31e5bc24178d33c24e3da93e65ce5671c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Thu, 9 Jun 2022 22:54:22 +0200 Subject: [PATCH] use isModEnabled function --- htdocs/modulebuilder/admin/setup.php | 2 +- htdocs/modulebuilder/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/modulebuilder/admin/setup.php b/htdocs/modulebuilder/admin/setup.php index e7c42578bd6..08791b8324a 100644 --- a/htdocs/modulebuilder/admin/setup.php +++ b/htdocs/modulebuilder/admin/setup.php @@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; global $conf, $langs, $user, $db; $langs->loadLangs(array("admin", "other", "modulebuilder")); -if (!$user->admin || empty($conf->modulebuilder->enabled)) { +if (!$user->admin || !isModEnabled('modulebuilder')) { accessforbidden(); } diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 10a040ca7e5..68aa224423c 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -73,7 +73,7 @@ $objectname = dol_sanitizeFileName(GETPOST('objectname', 'alpha')); $dicname = dol_sanitizeFileName(GETPOST('dicname', 'alpha')); // Security check -if (empty($conf->modulebuilder->enabled)) { +if (!isModEnabled('modulebuilder')) { accessforbidden(); } if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) {