Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-09-25 06:10:24 +02:00
parent 0dacfd3fac
commit 8ca01513d5
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ if ($id > 0 || $ref) {
$selectedvariant = !empty($_SESSION['addvariant_'.$object->id]) ? $_SESSION['addvariant_'.$object->id] : array();
// Security check
if (empty($conf->variants->enabled)) {
if (!isModEnabled('variants')) {
accessforbidden('Module not enabled');
}
if ($user->socid > 0) { // Protection if external user

View File

@ -137,7 +137,7 @@ $permissiontoadd = $user->rights->variants->write;
$permissiontodelete = $user->rights->variants->delete;
// Security check
if (empty($conf->variants->enabled)) {
if (!isModEnabled('variants')) {
accessforbidden('Module not enabled');
}
$socid = 0;